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) placeField [read, write, assign]

指定要为对象 GMSPlace 提取的各个地点详情。

如果未替换,则默认为返回所有详细信息。