Overview
Protocol used by GMSAutocompleteResultsViewController
, to communicate the user's interaction with the controller to the application.
Public Member Functions | |
(void) | - resultsController:didAutocompleteWithPlace: |
Called when a place has been selected from the available autocomplete predictions. | |
(void) | - resultsController:didFailAutocompleteWithError: |
Called when a non-retryable error occurred when retrieving autocomplete predictions or place details. | |
(BOOL) | - resultsController:didSelectPrediction: |
Called when the user selects an autocomplete prediction from the list but before requesting place details. | |
(void) | - didUpdateAutocompletePredictionsForResultsController: |
Called once every time new autocomplete predictions are received. | |
(void) | - didRequestAutocompletePredictionsForResultsController: |
Called once immediately after a request for autocomplete predictions is made. |
Member Function Documentation
- (void) resultsController: | (GMSAutocompleteResultsViewController *) | resultsController | |
didAutocompleteWithPlace: | (GMSPlace *) | place | |
[required] |
Called when a place has been selected from the available autocomplete predictions.
- Parameters:
-
resultsController The GMSAutocompleteResultsViewController
that generated the event.place The GMSPlace
that was returned.
- (void) resultsController: | (GMSAutocompleteResultsViewController *) | resultsController | |
didFailAutocompleteWithError: | (NSError *) | error | |
[required] |
Called when a non-retryable error occurred when retrieving autocomplete predictions or place details.
A non-retryable error is defined as one that is unlikely to be fixed by immediately retrying the operation.
Only the following values of GMSPlacesErrorCode
are retryable:
- kGMSPlacesNetworkError
- kGMSPlacesServerError
- kGMSPlacesInternalError
All other error codes are non-retryable.
- Parameters:
-
resultsController The GMSAutocompleteResultsViewController
that generated the event.error The NSError
that was returned.
- (BOOL) resultsController: | (GMSAutocompleteResultsViewController *) | resultsController | |
didSelectPrediction: | (GMSAutocompletePrediction *) | prediction | |
[optional] |
Called when the user selects an autocomplete prediction from the list but before requesting place details.
Returning NO from this method will suppress the place details fetch and didAutocompleteWithPlace will not be called.
- Parameters:
-
resultsController The GMSAutocompleteResultsViewController
that generated the event.prediction The GMSAutocompletePrediction
that was selected.
- (void) didUpdateAutocompletePredictionsForResultsController: | (GMSAutocompleteResultsViewController *) | resultsController | [optional] |
Called once every time new autocomplete predictions are received.
- Parameters:
-
resultsController The GMSAutocompleteResultsViewController
that generated the event.
- (void) didRequestAutocompletePredictionsForResultsController: | (GMSAutocompleteResultsViewController *) | resultsController | [optional] |
Called once immediately after a request for autocomplete predictions is made.
- Parameters:
-
resultsController The GMSAutocompleteResultsViewController
that generated the event.