1

I am trying to change the color of my search bar the problem is when I do the cancel button loses its color and I am unable to see it. If you have any ideas please let me know. Thank you!

Code:

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
MLavoie
  • 9,671
  • 41
  • 36
  • 56
paul590
  • 1,385
  • 1
  • 22
  • 43

0 Answers0