GMSAutocompleteResultsViewController
@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.
-
Delegate to be notified when a place is selected.
Declaration
Swift
weak var delegate: (any GMSAutocompleteResultsViewControllerDelegate)? { get set }Objective-C
@property (nonatomic, weak, nullable) id<GMSAutocompleteResultsViewControllerDelegate> delegate; -
Filter to apply to autocomplete suggestions (can be nil).
Declaration
Swift
var autocompleteFilter: GMSAutocompleteFilter? { get set }Objective-C
@property (nonatomic, strong, nullable) GMSAutocompleteFilter *autocompleteFilter; -
The background color of table cells.
Declaration
Swift
var tableCellBackgroundColor: UIColor { get set }Objective-C
@property (nonatomic, strong) UIColor *_Nonnull tableCellBackgroundColor; -
The color of the separator line between table cells.
Declaration
Swift
var tableCellSeparatorColor: UIColor { get set }Objective-C
@property (nonatomic, strong) UIColor *_Nonnull tableCellSeparatorColor; -
The color of result name text in autocomplete results
Declaration
Swift
var primaryTextColor: UIColor { get set }Objective-C
@property (nonatomic, strong) UIColor *_Nonnull primaryTextColor; -
The color used to highlight matching text in autocomplete results
Declaration
Swift
var primaryTextHighlightColor: UIColor { get set }Objective-C
@property (nonatomic, strong) UIColor *_Nonnull primaryTextHighlightColor; -
The color of the second row of text in autocomplete results.
Declaration
Swift
var secondaryTextColor: UIColor { get set }Objective-C
@property (nonatomic, strong) UIColor *_Nonnull secondaryTextColor; -
The tint color applied to controls in the Autocomplete view.
Declaration
Swift
var tintColor: UIColor? { get set }Objective-C
@property (nonatomic, strong, nullable) UIColor *tintColor; -
Specify array of place property names to fetch for object
GMSPlace. Defaults to returning all details if not overridden.Declaration
Swift
var placeProperties: [String] { get set }Objective-C
@property (nonatomic, strong) NSArray<NSString *> *_Nonnull placeProperties; -
Specify individual place details to fetch for object
GMSPlace. Defaults to returning all details if not overridden.Declaration
Swift
var placeFields: GMSPlaceField { get set }Objective-C
@property (nonatomic) GMSPlaceField placeFields;