【发布时间】:2016-06-11 11:18:40
【问题描述】:
我正在使用 Google Places API 来实现自动完成小部件。我正在使用 swift 在 ios 9+ 中显示全屏控件。我正在添加文档中给出的完整控件。
我已经添加了文档中显示的代码。现在我想将 searchBar 文本颜色更改为 whiteColor。
所以我尝试了这个
UITextField.appearanceWhenContainedInInstancesOfClasses([UISearchBar.self]).textColor = UIColor.whiteColor()
但我没有得到想要的行为。下面是截图
这已在文档中给出
https://developers.google.com/places/ios-api/autocomplete#use_a_table_data_source
但这不起作用。我需要这方面的帮助。
【问题讨论】:
-
解释所需的输出和您遇到的错误
-
如果可能的话,最好详细说明问题并附上快照,否则很难得到准确的解决方案。
标签: google-maps uisearchbar google-places-api uiappearance