gpt4 book ai didi

ios - GMSAutocompleteViewController iOS,如何更改搜索栏中的文本颜色

转载 作者:搜寻专家 更新时间:2023-10-31 22:44:48 24 4
gpt4 key购买 nike

<分区>

我正在使用 GMSAutocompleteViewController 并想更改 searchBar 中的 textColor 但找不到方法,我设法更改了一些颜色但没有更改 searchBar 文本。

enter image description here

我尝试了以下代码,但颜色不会改变:

        acController.searchBarController?.searchBar.tintColor = UIColor.whiteColor()
acController.searchBarController?.searchBar.textColor = UIColor.whiteColor()

acController.searchBarController?.searchBar.textField.textColor = UIColor.whiteColor()
acController.searchBarController?.searchBar.textField.tintColor = UIColor.whiteColor()
acController.searchBarController?.searchBar.textField.backgroundColor = UIColor.whiteColor()

acController.searchDisplayController?.searchBar.setTextColor(UIColor.whiteColor())
acController.searchDisplayController?.searchBar.tintColor = UIColor.whiteColor()

// changes the color of the sugested places
acController.primaryTextColor = UIColor.whiteColor()
acController.secondaryTextColor = UIColor.whiteColor()

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com