TKAutoCompleteDelegate Protocol Reference
Conforms to | NSObject |
Declared in | TKAutoCompleteTextView.h |
Overview
The TKAutoCompleteDelegate protocol defines methods that allow you to manage the components of the autocomplete and the interaction with them.
Tasks
-
– autoComplete:viewForToken:
-
– autoComplete:didAutoComplete:
-
– autoComplete:willShowSuggestionList:
-
– autoComplete:suggestionListUpdated:
-
– autoComplete:shouldAddToken:
-
– autoComplete:didAddToken:
-
– autoComplete:shouldRemoveToken:
-
– autoComplete:didRemoveToken:
-
– autoComplete:didSelectToken:
-
– autoComplete:didDeselectToken:
-
– autoCompleteDidStartEditing:
Instance Methods
autoComplete:didAddToken:
The method is called after a suggestion has been chosen to complete the text input.
- (void)autoComplete:(TKAutoCompleteTextView *__nonnull)autocomplete didAddToken:(TKAutoCompleteToken *__nonnull)token
Parameters
- autocomplete
The object where the event occurred.
- token
The added token.
Declared In
TKAutoCompleteTextView.h
autoComplete:didAutoComplete:
The method is called after a suggestion has been chosen to complete the text input.
- (void)autoComplete:(TKAutoCompleteTextView *__nonnull)autocomplete didAutoComplete:(TKAutoCompleteToken *__nonnull)token
Parameters
- autocomplete
The object where the event occurred.
- completion
The chosen completion.
Declared In
TKAutoCompleteTextView.h
autoComplete:didDeselectToken:
The method is called after a token stops being selected.
- (void)autoComplete:(TKAutoCompleteTextView *__nonnull)autocomplete didDeselectToken:(TKAutoCompleteToken *__nonnull)token
Parameters
- autocomplete
The object where the event occurred.
- token
The TKAutoCompleteToken object model of the deselected token.
Declared In
TKAutoCompleteTextView.h
autoComplete:didRemoveToken:
The method is called after a token has been deleted.
- (void)autoComplete:(TKAutoCompleteTextView *__nonnull)autocomplete didRemoveToken:(TKAutoCompleteToken *__nonnull)token
Parameters
- autocomplete
The object where the event occurred.
- token
The TKAutoCompleteToken object model of the deleted token.
Declared In
TKAutoCompleteTextView.h
autoComplete:didSelectToken:
The method is called after a token has become a first responder.
- (void)autoComplete:(TKAutoCompleteTextView *__nonnull)autocomplete didSelectToken:(TKAutoCompleteToken *__nonnull)token
Parameters
- autocomplete
The object where the event occurred.
- token
The TKAutoCompleteToken object model of the selected token.
Declared In
TKAutoCompleteTextView.h
autoComplete:shouldAddToken:
Returns a boolean value indicating whether the specified item should be selected.
- (BOOL)autoComplete:(TKAutoCompleteTextView *__nonnull)autocomplete shouldAddToken:(TKAutoCompleteToken *__nonnull)token
Parameters
- autocomplete
The object where the event occurred.
- token
The TKAutoCompleteToken object model.
Return Value
YES if the item should be selected.
Declared In
TKAutoCompleteTextView.h
autoComplete:shouldRemoveToken:
Returns a boolean value indicating whether the specified item should be deleted.
- (BOOL)autoComplete:(TKAutoCompleteTextView *__nonnull)autocomplete shouldRemoveToken:(TKAutoCompleteToken *__nonnull)token
Parameters
- autocomplete
The object where the event occurred.
- token
The TKAutoCompleteToken object model.
Return Value
YES if the item should be deleted.
Declared In
TKAutoCompleteTextView.h
autoComplete:suggestionListUpdated:
The method is called when the suggestions are updated. Provides access to the possible completions.
- (void)autoComplete:(TKAutoCompleteTextView *__nonnull)autocomplete suggestionListUpdated:(NSArray<__kindofTKAutoCompleteToken*> *__nonnull)suggestionList
Parameters
- autocomplete
The object where the event occurred.
- suggestionList
The list of possible completions.
Declared In
TKAutoCompleteTextView.h
autoComplete:viewForToken:
Provides a TKAutoCompleteTokenView to display the current object model TKAutoCompleteToken.
- (TKAutoCompleteTokenView *__nonnull)autoComplete:(TKAutoCompleteTextView *__nonnull)autocomplete viewForToken:(TKAutoCompleteToken *__nonnull)token
Parameters
- autocomplete
The current TKAutoCompleteTextView object.
- token
The TKAutoCompleteToken object model.
Declared In
TKAutoCompleteTextView.h
autoComplete:willShowSuggestionList:
The method is called before the suggestion list is shown. Provides access to the possible completions.
- (void)autoComplete:(TKAutoCompleteTextView *__nonnull)autocomplete willShowSuggestionList:(NSArray<__kindofTKAutoCompleteToken*> *__nonnull)suggestionList
Parameters
- autocomplete
The object where the event occurred.
- suggestionList
The list of possible completions.
Declared In
TKAutoCompleteTextView.h
autoCompleteDidStartEditing:
The method is called when the TKAutoCompleteTextView becomes first responder.
- (void)autoCompleteDidStartEditing:(TKAutoCompleteTextView *__nonnull)autocomplete
Parameters
- autocomplete
The current TKAutoCompleteTextView object.
Declared In
TKAutoCompleteTextView.h