You're all set!

To start developing, please head over to our developer documentation.

Activate the Google Places API for iOS

To get you started we'll guide you through the Google Developers Console to do a few things first:

  1. Create or choose a project
  2. Activate the Google Places API for iOS
  3. Create appropriate keys
Continue

GMSAutocompleteViewController Class Reference

GMSAutocompleteViewController Class Reference

Overview

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.

Properties

IBOutlet id
< GMSAutocompleteViewControllerDelegate
delegate
 Delegate to be notified when a place is selected or picking is cancelled.
GMSCoordinateBounds * autocompleteBounds
 Bounds used to bias or restrict the autocomplete results depending on the value of autocompleteBoundsMode (can be nil).
GMSAutocompleteBoundsMode autocompleteBoundsMode
 How to treat the autocompleteBounds property.
GMSAutocompleteFilterautocompleteFilter
 Filter to apply to autocomplete suggestions (can be nil).
IBInspectable UIColor * tableCellBackgroundColor
 The background color of table cells.
IBInspectable UIColor * tableCellSeparatorColor
 The color of the separator line between table cells.
IBInspectable UIColor * primaryTextColor
 The color of result name text in autocomplete results.
IBInspectable UIColor * primaryTextHighlightColor
 The color used to highlight matching text in autocomplete results.
IBInspectable UIColor * secondaryTextColor
 The color of the second row of text in autocomplete results.
IBInspectable UIColor * tintColor
 The tint color applied to controls in the Autocomplete view.

Property Documentation

- (IBOutlet id<GMSAutocompleteViewControllerDelegate>) delegate [read, write, assign]

Delegate to be notified when a place is selected or picking is cancelled.

- (GMSCoordinateBounds*) autocompleteBounds [read, write, assign]

Bounds used to bias or restrict the autocomplete results depending on the value of autocompleteBoundsMode (can be nil).

How to treat the autocompleteBounds property.

Defaults to kGMSAutocompleteBoundsModeBias.

Has no effect if autocompleteBounds is nil.

- (GMSAutocompleteFilter*) autocompleteFilter [read, write, assign]

Filter to apply to autocomplete suggestions (can be nil).

- (IBInspectable UIColor*) tableCellBackgroundColor [read, write, assign]

The background color of table cells.

- (IBInspectable UIColor*) tableCellSeparatorColor [read, write, assign]

The color of the separator line between table cells.

- (IBInspectable UIColor*) primaryTextColor [read, write, assign]

The color of result name text in autocomplete results.

- (IBInspectable UIColor*) primaryTextHighlightColor [read, write, assign]

The color used to highlight matching text in autocomplete results.

- (IBInspectable UIColor*) secondaryTextColor [read, write, assign]

The color of the second row of text in autocomplete results.

- (IBInspectable UIColor*) tintColor [read, write, assign]

The tint color applied to controls in the Autocomplete view.

Send feedback about...

location_on
Google Places API for iOS