GMSAutocompleteResultsViewController 類別參考資料

GMSAutocompleteResultsViewController 類別參考資料

總覽

GMSAutocompleteResultsViewController 提供了一個介面,可在表格檢視畫面中顯示地點自動完成預測。

每當輸入文字變更時,資料表檢視畫面就會自動更新。

這個類別是用來當做 UISearchController 的搜尋結果控制器。將 GMSAutocompleteResultsViewController 的執行個體傳遞至 UISearchController 的 initWithSearchResultsController 方法,然後將控制器設為 UISearchController 的 searchResultsUpdater 屬性。

使用 GMSAutocompleteResultsViewControllerDelegate 委派通訊協定,即可在清單中選擇地點時收到通知。

資源

id
< GMSAutocompleteResultsViewControllerDelegate >
委派
 選擇地點時會收到通知的代表。
GMSAutocompleteFilterautocompleteFilter
 篩選出來套用至自動完成建議的項目 (可以設為 nil)。
IBInspectable UIColor * tableCellBackgroundColor
 表格儲存格的背景顏色。
IBInspectable UIColor * tableCellSeparatorColor
 表格儲存格之間的分隔線顏色。
IBInspectable UIColor * primaryTextColor
 自動完成結果中結果名稱文字的顏色。
IBInspectable UIColor * primaryTextHighlightColor
 這個顏色是用於在自動完成結果中醒目顯示相符文字。
IBInspectable UIColor * secondaryTextColor
 自動完成結果中第二列文字的顏色。
IBInspectable UIColor * tintColor
 套用至「自動完成」檢視畫面中控制項的色調顏色。
GMSPlaceFieldplaceFields
 指定要為物件 GMSPlace 擷取的個別地點詳細資料。

屬性說明文件

選擇地點時會收到通知的代表。

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

篩選出來套用至自動完成建議的項目 (可以設為 nil)。

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

表格儲存格的背景顏色。

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

表格儲存格之間的分隔線顏色。

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

自動完成結果中結果名稱文字的顏色。

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

這個顏色是用於在自動完成結果中醒目顯示相符文字。

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

自動完成結果中第二列文字的顏色。

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

套用至「自動完成」檢視畫面中控制項的色調顏色。

- (GMSPlaceField) placeFields [read, write, assign]

指定要為物件 GMSPlace 擷取的個別地點詳細資料。

如未覆寫,就會預設傳回所有詳細資料。