GMSAutocompleteViewController 類別參考資料

GMSAutocompleteViewController 類別參考

總覽

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

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

如要使用 GMSAutocompleteViewController,請將其委派給您應用程式中符合 GMSAutocompleteViewControllerDelegate 通訊協定的物件,並顯示控制器 (例如使用 PresentViewController)。GMSAutocompleteViewControllerDelegate 委派方法可用來判斷使用者何時選取地點或已取消選取。

資源

IBOutlet ID
< GMSAutocompleteViewControllerDelegate >
委派
 地點選取或選好後,會收到通知的委派代表。
GMSAutocompleteFilterautocompleteFilter
 套用至自動完成建議建議的篩選器 (可以是空值)。
IBInspectable UIColor * tableCellBackgroundColor
 表格儲存格的背景顏色。
IBInspectable UIColor * tableCellSeparatorColor
 表格儲存格之間的分隔線顏色。
IBInspectable UIColor * primaryTextColor
 自動完成結果中結果名稱文字的顏色。
IBInspectable UIColor * primaryTextHighlightColor
 系統會在自動完成結果中用來醒目顯示相符文字的顏色。
IBInspectable UIColor * secondaryTextColor
 自動完成結果中第二列文字的顏色。
IBInspectable UIColor * tintColor
 自動完成檢視中套用至控制項的色調顏色。
GMSPlaceFieldplaceFields
 指定要針對物件 GMSPlace 擷取的個別地點詳細資料。
NSArray< GMSPlaceProperty > * placeProperties
 用於指定要求明確地點詳細資料的 GMSPlaceProperty

資源說明文件

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

地點選取或選好後,會收到通知的委派代表。

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

套用至自動完成建議建議的篩選器 (可以是空值)。

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

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

- (NSArray<GMSPlaceProperty>*) placeProperties [read, write, assign]

用於指定要求明確地點詳細資料的 GMSPlaceProperty

預設會傳回所有可用的屬性。