public protocol GMSAutocompleteViewControllerDelegate : NSObjectProtocol {
/**
* Called when a place has been selected from the available autocomplete predictions.
*
* Implementations of this method should dismiss the view controller as the view controller will not
* dismiss itself.
*
* @param viewController The |GMSAutocompleteViewController| that generated the event.
* @param place The |GMSPlace| that was returned.
*/
public func viewController(_ viewController: GMSAutocompleteViewController, didAutocompleteWith place: GMSPlace)
/**
* 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.
*
* @param viewController The |GMSAutocompleteViewController| that generated the event.
* @param error The |NSError| that was returned.
*/
public func viewController(_ viewController: GMSAutocompleteViewController, didFailAutocompleteWithError error: Error)
/**
* Called when the user taps the Cancel button in a |GMSAutocompleteViewController|.
*
* Implementations of this method should dismiss the view controller as the view controller will not
* dismiss itself.
*
* @param viewController The |GMSAutocompleteViewController| that generated the event.
*/
public func wasCancelled(_ viewController: GMSAutocompleteViewController)
/**
* 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.
*
* @param viewController The |GMSAutocompleteViewController| that generated the event.
* @param prediction The |GMSAutocompletePrediction| that was selected.
*/
optional public func viewController(_ viewController: GMSAutocompleteViewController, didSelect prediction: GMSAutocompletePrediction) -> Bool
/**
* Called once every time new autocomplete predictions are received.
*
* @param viewController The |GMSAutocompleteViewController| that generated the event.
*/
optional public func didUpdateAutocompletePredictions(_ viewController: GMSAutocompleteViewController)
/**
* Called once immediately after a request for autocomplete predictions is made.
*
* @param viewController The |GMSAutocompleteViewController| that generated the event.
*/
optional public func didRequestAutocompletePredictions(_ viewController: GMSAutocompleteViewController)
}
/**
* GMSAutocompleteViewController provides an interface that displays a table of autocomplete
* predictions that updates as the user enters text. Place selections made by the user are
* returned to the app via the |GMSAutocompleteViewControllerResultsDelegate| protocol.
*
* To use GMSAutocompleteViewController, set its delegate to an object in your app that
* conforms to the |GMSAutocompleteViewControllerDelegate| protocol and present the controller
* (eg using presentViewController). The |GMSAutocompleteViewControllerDelegate| delegate methods
* can be used to determine when the user has selected a place or has cancelled selection.
*/