GMSAutocompleteViewController 類別參考資料

GMSAutocompleteViewController 類別參考資料

總覽

GMSAutocompleteViewController 提供的介面會顯示自動完成預測表格,該表格會在使用者輸入文字時更新。

使用者選取的地點會透過 GMSAutocompleteViewControllerResultsDelegate 通訊協定傳回應用程式。

如要使用GMSAutocompleteViewController,請將其委派對象設為應用程式中符合 GMSAutocompleteViewControllerDelegate 通訊協定的物件,並且呈現控制器 (例如使用 PresentViewController)。您可以使用 GMSAutocompleteViewControllerDelegate 委派方法,判斷使用者何時選取地點或取消選擇。

資源

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

屬性說明文件

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

在選取地點或選擇取消時通知委派對象。

- (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 擷取的個別地點詳細資料。

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