TTAutocompleteDelegate
Objective-C
@protocol TTAutocompleteDelegate <NSObject>
Swift
protocol TTAutocompleteDelegate : NSObjectProtocol
@brief TTAutocomplete delegate.
-
Method that handles the search response when a search returns a response. Within this callback the user will obtain a response populated with results.
Declaration
Objective-C
- (void)request:(TTAutocomplete *_Nonnull)request completedWithResponse:(TTAutocompleteResponse *_Nonnull)result;Swift
optional func request(_ request: TTAutocomplete, completedWith result: TTAutocompleteResponse)Parameters
requestObject type TTAutocomplete.
resultObject type TTAutocompleteResponse.
-
Method that handles the search Response when a search returns an error. Within this callback the user will obtain a Throwable fail reason.
Declaration
Objective-C
- (void)request:(TTAutocomplete *_Nonnull)request failedWithError:(TTResponseError *_Nonnull)error;Swift
optional func request(_ request: TTAutocomplete, failedWithError error: Any!)Parameters
requestObject type TTAutocompleteRequest.
errorObject type TTResponseError.
TTAutocompleteDelegate Protocol Reference