iOS 11 customise search bar in navigation bar
I just found out how to set also the rest of them: (with some help of Brandon, thanks!) The “Cancel” text: searchController.searchBar.tintColor = .white The search icon: searchController.searchBar.setImage(UIImage(named: “my_search_icon”), for: UISearchBarIcon.search, state: .normal) The clear icon: searchController.searchBar.setImage(UIImage(named: “my_search_icon”), for: UISearchBarIcon.clear, state: .normal) The search text: UITextField.appearance(whenContainedInInstancesOf: [UISearchBar.self]).defaultTextAttributes = [NSAttributedStringKey.foregroundColor.rawValue: UIColor.white] Thanks for the help @Brandon! … Read more