搜索栏颜色ios 11

时间:2018-02-19 19:11:23

标签: ios swift uisearchbar

我正在尝试更改搜索栏的颜色问题是当我取消按钮失去颜色而我无法看到它。如果您有任何想法,请告诉我。谢谢!

代码:

self.searchController = UISearchController.init(searchResultsController: searchDataSource)
self.searchController?.obscuresBackgroundDuringPresentation = true
self.searchController?.searchBar.delegate = self
self.searchController?.searchBar.showsCancelButton = true
self.searchController?.searchBar.placeholder = "Search for items"
self.searchController?.searchBar.isTranslucent = false
self.searchController?.searchBar.barTintColor = UIColor.white
self.searchController?.searchBar.tintColor = UIColor.black

0 个答案:

没有答案