A search criterion in a search text field, represented by text and an optional icon.


@interface UISearchToken : NSObject


Use search tokens to help users understand and edit complex search queries in a UISearchTextField. A token acts like a single character in standard text interactions, like deleting, selecting, or dragging. A search token should always have text and may also have an icon.

Screenshot of a search window with a red circle and the words "Red Flowers Carnation". The red dot and "Red Flowers" are in a gray box labeled as a UISearchToken and "Carnation" is labeled as text.

Assign a representedObject on each search token that's meaningful to your app. That way you can reconstruct the full search query using information available in the search field when, for example, your app starts from state restoration or the user starts a search.


Instance Properties


Inherits From

See Also

Text Views


A view that displays one or more lines of informational text.


An object that displays an editable text area in your interface.


A scrollable, multiline text region.

Drag and Drop Customization

Extend the standard drag and drop support for text views to include custom types of content.