title: iOS 11 customise search bar in navigation bar
body: <p>I want to change the color of the text and icon in the iOS 11 searchbar when it is embedded in the navigation bar. So placeholder text, search text and search icon.</p>
  
  <p><a href="https://i.stack.imgur.com/sDDJ0.png" rel="noreferrer"><img src="https://i.stack.imgur.com/sDDJ0.png" alt="enter image description here"></a></p>
  
  <pre><code>if #available(iOS 11.0, *) {
      navigationController?.navigationBar.prefersLargeTitles = false
      let searchController = UISearchController(searchResultsController: nil)
      navigationItem.searchController = searchController
      navigationItem.hidesSearchBarWhenScrolling = false
  
      searchController.searchBar.placeholder = "Suchen"
      searchController.searchBar.tintColor = .white
  }
  </code></pre>
  
  <p>As you can see in the image, the text is grey on a deep blue background, which looks ugly. I want to text and icon to be at least white. (changing the blue background color also does not work really good, see <a href="https://stackoverflow.com/questions/45997996/ios-11-uisearchbar-in-uinavigationbar">my other question</a>)</p>
  
  <p>The only thing which works is changing the color of the blinking cursor and the "cancel" button, which is done with the .tintColor property.</p>
  
  <p>Solutions which seems to work in iOS 10 and below seem not work anymore in iOS 11, so please post only solutions which you know working in iOS 11. Thanks.</p>
  
  <p>Maybe I miss the point about this "automatic styling" in iOS 11. Any help is appreciated.</p>