GMSAutocompleteResultsViewController 類別參考資料
總覽
GMSAutocompleteResultsViewController:提供介面,可在表格檢視中顯示地點自動完成預測。
表格檢視畫面會在輸入內容的文字變更時自動更新。
這個類別可用來當做 UISearchController 的搜尋結果控制器。將 GMSAutocompleteResultsViewController
的執行個體傳遞至 UISearchController 的 initWithSearchResultsController 方法,然後將控制器設為 UISearchController 的 searchResultsUpdater 屬性。
請使用 GMSAutocompleteResultsViewControllerDelegate
委派通訊協定,在清單中選取地點時接收通知。
屬性 | |
id < GMSAutocompleteResultsViewControllerDelegate > | 委派 |
委派對象選取地點後,即可收到相關通知。 | |
GMSAutocompleteFilter * | AutocompleteFilter |
套用至自動完成建議的篩選器 (可以是空值)。 | |
IBInspectable UIColor * | tableCellBackgroundColor |
表格儲存格的背景顏色。 | |
IBInspectable UIColor * | tableCellSeparatorColor |
表格儲存格之間的分隔符顏色。 | |
IBInspectable UIColor * | 主要文字顏色 |
自動完成結果中的結果名稱文字顏色。 | |
IBInspectable UIColor * | 主要文字醒目顯示顏色 |
用於在自動完成結果中醒目顯示相符文字的顏色。 | |
IBInspectable UIColor * | 次要文字顏色 |
自動完成結果中第二列文字的顏色。 | |
IBInspectable UIColor * | 色調 |
於「自動完成」檢視中的控制項套用色調。 | |
GMSPlaceField | 地點欄位 |
指定要擷取物件 GMSPlace 的個別地點詳細資料。 |
資源說明文件
- (id<GMSAutocompleteResultsViewControllerDelegate>) 委派 [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
的個別地點詳細資料。
如未覆寫,預設會傳回所有詳細資料。