Does anyone know why setting the text color of the search bar programmatically in viewDidLoad does not work and is requiring setting it to .white in viewWillAppear?
var searchController = UISearchController(searchResultsController: nil)
searchController.searchBar.delegate = self
searchController.searchBar.sizeToFit()
searchController.obscuresBackgroundDuringPresentation = false
searchController.hidesNavigationBarDuringPresentation = false
searchController.searchBar.placeholder = "Search here"
searchController.searchBar.searchTextField.textColor = .white
self.navigationItem.searchController = searchController