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.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-11-08 UTC."],[[["\u003cp\u003e\u003ccode\u003eGMSAutocompleteResultsViewController\u003c/code\u003e displays place autocomplete predictions in a table view, updating automatically with text input changes.\u003c/p\u003e\n"],["\u003cp\u003eIt's designed to be the search results controller for a \u003ccode\u003eUISearchController\u003c/code\u003e, handling place selection through the \u003ccode\u003eGMSAutocompleteResultsViewControllerDelegate\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eDevelopers can customize the appearance, including table cell colors, text colors, and a tint color for controls.\u003c/p\u003e\n"],["\u003cp\u003eFiltering of autocomplete suggestions is possible using the \u003ccode\u003eautocompleteFilter\u003c/code\u003e property.\u003c/p\u003e\n"],["\u003cp\u003eControl the details fetched for selected places by setting \u003ccode\u003eplaceProperties\u003c/code\u003e or \u003ccode\u003eplaceFields\u003c/code\u003e to retrieve specific information.\u003c/p\u003e\n"]]],["`GMSAutocompleteResultsViewController` displays place autocomplete predictions in a table view, updating as text changes. It's used with `UISearchController` by setting it as the `searchResultsController` and `searchResultsUpdater`. Key actions include setting a delegate to handle place selections, applying filters to suggestions, and customizing table cell and text colors. You can also specify place properties or fields to retrieve and customize the view's tint color.\n"],null,["GMSAutocompleteResultsViewController \n\n @interface GMSAutocompleteResultsViewController\n : UIViewController \u003cUISearchResultsUpdating\u003e\n\n`GMSAutocompleteResultsViewController` provides an interface that displays place autocomplete\npredictions in a table view. The table view will be automatically updated as input text\nchanges.\n\nThis class is intended to be used as the search results controller of a UISearchController. Pass\nan instance of `GMSAutocompleteResultsViewController` to UISearchController's\ninitWithSearchResultsController method, then set the controller as the UISearchController's\nsearchResultsUpdater property.\n\nUse the [GMSAutocompleteResultsViewControllerDelegate](../Protocols/GMSAutocompleteResultsViewControllerDelegate.html) delegate protocol to be notified when a\nplace is selected from the list.\n- `\n ``\n ``\n `\n\n [delegate](#/c:objc(cs)GMSAutocompleteResultsViewController(py)delegate)`\n ` \n Delegate to be notified when a place is selected. \n\n Declaration \n Swift \n\n weak var delegate: (any ../Protocols/GMSAutocompleteResultsViewControllerDelegate.html)? { get set }\n\n Objective-C \n\n @property (nonatomic, weak, nullable) id\u003c../Protocols/GMSAutocompleteResultsViewControllerDelegate.html\u003e delegate;\n\n- `\n ``\n ``\n `\n\n [autocompleteFilter](#/c:objc(cs)GMSAutocompleteResultsViewController(py)autocompleteFilter)`\n ` \n Filter to apply to autocomplete suggestions (can be nil). \n\n Declaration \n Swift \n\n var autocompleteFilter: ../Classes/GMSAutocompleteFilter.html? { get set }\n\n Objective-C \n\n @property (nonatomic, strong, nullable) ../Classes/GMSAutocompleteFilter.html *autocompleteFilter;\n\n- `\n ``\n ``\n `\n\n [tableCellBackgroundColor](#/c:objc(cs)GMSAutocompleteResultsViewController(py)tableCellBackgroundColor)`\n ` \n The background color of table cells. \n\n Declaration \n Swift \n\n var tableCellBackgroundColor: UIColor { get set }\n\n Objective-C \n\n @property (nonatomic, strong) UIColor *_Nonnull tableCellBackgroundColor;\n\n- `\n ``\n ``\n `\n\n [tableCellSeparatorColor](#/c:objc(cs)GMSAutocompleteResultsViewController(py)tableCellSeparatorColor)`\n ` \n The color of the separator line between table cells. \n\n Declaration \n Swift \n\n var tableCellSeparatorColor: UIColor { get set }\n\n Objective-C \n\n @property (nonatomic, strong) UIColor *_Nonnull tableCellSeparatorColor;\n\n- `\n ``\n ``\n `\n\n [primaryTextColor](#/c:objc(cs)GMSAutocompleteResultsViewController(py)primaryTextColor)`\n ` \n The color of result name text in autocomplete results \n\n Declaration \n Swift \n\n var primaryTextColor: UIColor { get set }\n\n Objective-C \n\n @property (nonatomic, strong) UIColor *_Nonnull primaryTextColor;\n\n- `\n ``\n ``\n `\n\n [primaryTextHighlightColor](#/c:objc(cs)GMSAutocompleteResultsViewController(py)primaryTextHighlightColor)`\n ` \n The color used to highlight matching text in autocomplete results \n\n Declaration \n Swift \n\n var primaryTextHighlightColor: UIColor { get set }\n\n Objective-C \n\n @property (nonatomic, strong) UIColor *_Nonnull primaryTextHighlightColor;\n\n- `\n ``\n ``\n `\n\n [secondaryTextColor](#/c:objc(cs)GMSAutocompleteResultsViewController(py)secondaryTextColor)`\n ` \n The color of the second row of text in autocomplete results. \n\n Declaration \n Swift \n\n var secondaryTextColor: UIColor { get set }\n\n Objective-C \n\n @property (nonatomic, strong) UIColor *_Nonnull secondaryTextColor;\n\n- `\n ``\n ``\n `\n\n [tintColor](#/c:objc(cs)GMSAutocompleteResultsViewController(py)tintColor)`\n ` \n The tint color applied to controls in the Autocomplete view. \n\n Declaration \n Swift \n\n var tintColor: UIColor? { get set }\n\n Objective-C \n\n @property (nonatomic, strong, nullable) UIColor *tintColor;\n\n- `\n ``\n ``\n `\n\n [placeProperties](#/c:objc(cs)GMSAutocompleteResultsViewController(py)placeProperties)`\n ` \n Specify array of place property names to fetch for object [GMSPlace](../Classes/GMSPlace.html). Defaults to returning all\n details if not overridden. \n\n Declaration \n Swift \n\n var placeProperties: [String] { get set }\n\n Objective-C \n\n @property (nonatomic, strong) NSArray\u003cNSString *\u003e *_Nonnull placeProperties;\n\n- `\n ``\n ``\n `\n\n [placeFields](#/c:objc(cs)GMSAutocompleteResultsViewController(py)placeFields)`\n ` \n Specify individual place details to fetch for object [GMSPlace](../Classes/GMSPlace.html). Defaults to returning all\n details if not overridden. \n\n Declaration \n Swift \n\n var placeFields: ../Enums/GMSPlaceField.html { get set }\n\n Objective-C \n\n @property (nonatomic) ../Enums/GMSPlaceField.html placeFields;"]]