GooglePlaces Framework Reference

  • GMSAutocompleteViewController presents an interface for users to select a place from a list of autocomplete predictions.

  • Place selections are communicated back to the app through the GMSAutocompleteViewControllerResultsDelegate protocol.

  • Developers can customize the appearance of the autocomplete view, such as colors and table cell styles.

  • Filtering of autocomplete suggestions is possible using the autocompleteFilter property.

  • The placeFields and placeProperties properties allow for the customization of the level of place details returned upon selection.

GMSAutocompleteViewController

Deprecated

Use the placeAutocomplete View extension in Places Swift SDK (https://developers.google.com/maps/documentation/places/ios-sdk/google-places-swift) instead.


@interface GMSAutocompleteViewController : UIViewController

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.