title: Customize the searchController of navigationItem , but doesn't work with iOS 11
body: <p>I have searched the similar question <a href="https://stackoverflow.com/questions/45663169/uisearchcontroller-ios-11-customization">UISearchController iOS 11 customization</a>but al the methods in the comments couldn't help me out.So I want to ask it again.</p>
  
  <p>I used the following codes to set the appearance of the searchBar.</p>
  
  <p><strong>Extension the UISearchBr to get the textField and placeHolderLabel:</strong></p>
  
  <pre><code>extension UISearchBar{
  
      var textField: UITextField?{
          if let textField = self.value(forKey: "searchField") as? UITextField {
  
             return textField
          }
          return nil
      }
  
      var placehloderLabel:UILabel?{
  
          if let placeholderLabel = textField?.value(forKey: "placeholderLabel") as? UILabel{
              return placeholderLabel
      }
          return nil
      }
  }
  </code></pre>
  
  <p><strong>Customize a subclass of UISearchController:</strong></p>
  
  <pre><code>class CustomSearchController:UISearchController{
  
      override init(searchResultsController: UIViewController?) {
  
          super.init(searchResultsController: searchResultsController)
          self.definesPresentationContext = true
          self.dimsBackgroundDuringPresentation = false
          self.hidesNavigationBarDuringPresentation = true
          self.searchBar.searchBarStyle = .minimal
  
          self.searchBar.placeholder = "搜索歌单内歌曲"
          self.searchBar.textField?.textColor = UIColor.white
          self.searchBar.placehloderLabel?.textColor = .white
          self.searchBar.placehloderLabel?.font = UIFont.systemFont(ofSize: 15)
  
      }
  </code></pre>
  
  <p>Set prefersLargeTitles    <code>UINavigationBar.appearance().prefersLargeTitles = true</code></p>
  
  <p>If  <code>navigationItem.searchController = searchController</code> and the result is as follows (the appearance of the searchBar <strong>DOESN'T</strong> make change):
  <a href="https://i.stack.imgur.com/2O1Ve.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/2O1Ve.png" alt="enter image description here"></a></p>
  
  <p>But if I set <code>navigationItem.titleView = searchController.searchBar</code>,it makes:
  <a href="https://i.stack.imgur.com/hXoQ6.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/hXoQ6.png" alt="enter image description here"></a></p>
  
  <blockquote>
    <p>Does the iOS 11 permit developers to change the searchBar's
    appearance?If yes,I wonder how to customize it ?Any
    point is appreciated.Thanks!</p>
  </blockquote>