Contents

UISearchTextFieldDelegate

The interface for the delegate of a search field.

Declaration

@MainActor protocol UISearchTextFieldDelegate : UITextFieldDelegate

Overview

A search field asks its delegate for an NSItemProvider when the user starts to copy or move a token. To support these interactions, set the search field’s delegate to an instance of UISearchTextFieldDelegate that implements searchTextField(_:itemProviderForCopying:) and set the search field’s allowsCopyingTokens property to true.

The search field’s pasteDelegate handles pasting and dropping tokens as well as text.

Topics

Providing information to copy and drag

Responding to search suggestion selections

See Also

Search field