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,277
  • 40
  • 37
  • 54
paul590
  • 1,315
  • 1
  • 17
  • 39

0 Answers0