GooglePlaces Framework Reference

  • GMSAutocompleteResultsViewController displays place autocomplete predictions in a table view, updating automatically with text input changes.

  • It's designed to be the search results controller for a UISearchController, handling place selection through the GMSAutocompleteResultsViewControllerDelegate.

  • Developers can customize the appearance, including table cell colors, text colors, and a tint color for controls.

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

  • Control the details fetched for selected places by setting placeProperties or placeFields to retrieve specific information.

GMSAutocompleteResultsViewController

Deprecated

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


@interface GMSAutocompleteResultsViewController
    : UIViewController <UISearchResultsUpdating>

GMSAutocompleteResultsViewController provides an interface that displays place autocomplete predictions in a table view. The table view will be automatically updated as input text changes.

This class is intended to be used as the search results controller of a UISearchController. Pass an instance of GMSAutocompleteResultsViewController to UISearchController’s initWithSearchResultsController method, then set the controller as the UISearchController’s searchResultsUpdater property.

Use the GMSAutocompleteResultsViewControllerDelegate delegate protocol to be notified when a place is selected from the list.