pub unsafe trait UISearchTextFieldDelegate: UITextFieldDelegate + MainThreadOnly {
// Provided methods
unsafe fn searchTextField_itemProviderForCopyingToken(
&self,
search_text_field: &UISearchTextField,
token: &UISearchToken,
) -> Retained<NSItemProvider>
where Self: Sized + Message { ... }
unsafe fn searchTextField_didSelectSuggestion(
&self,
search_text_field: &UISearchTextField,
suggestion: &ProtocolObject<dyn UISearchSuggestion>,
)
where Self: Sized + Message { ... }
}
Available on crate features
UISearchTextField
and UITextField
only.Expand description
Provided Methods§
Sourceunsafe fn searchTextField_itemProviderForCopyingToken(
&self,
search_text_field: &UISearchTextField,
token: &UISearchToken,
) -> Retained<NSItemProvider>
Available on crate features UIControl
and UIResponder
and UIView
only.
unsafe fn searchTextField_itemProviderForCopyingToken( &self, search_text_field: &UISearchTextField, token: &UISearchToken, ) -> Retained<NSItemProvider>
UIControl
and UIResponder
and UIView
only.Implements cut and copy of tokens.
To support drag and drop and the Cut and Copy commands, your delegate must implement this method and return an NSItemProvider for the requested token. The field’s textPasteDelegate is responsible for implementing pasting of tokens. Your delegate can provide a plain text representation for pasting in other contexts, but should register a custom type identifier so it can recognize and reconstruct the token when pasted into the same field.
This method will only be called if either of the field’s allowsCopyingTokens or allowsDeletingTokens properties is true.
Sourceunsafe fn searchTextField_didSelectSuggestion(
&self,
search_text_field: &UISearchTextField,
suggestion: &ProtocolObject<dyn UISearchSuggestion>,
)
Available on crate features UIControl
and UIResponder
and UISearchSuggestion
and UIView
only.
unsafe fn searchTextField_didSelectSuggestion( &self, search_text_field: &UISearchTextField, suggestion: &ProtocolObject<dyn UISearchSuggestion>, )
UIControl
and UIResponder
and UISearchSuggestion
and UIView
only.searchSuggestions property will be set to nil after sending this message