title: UISearchController in navigationBar
body: <p>I'm trying to use the new UISearchController in my tableViewController. </p>
  
  <p>However I'm a bit confused on how it can move up in the navigationController when I press the searchBar like it did with the old searchDisplayController? </p>
  
  <p>At the moment it just stay in the tableHeader.</p>
  
  <p>Here is my code:</p>
  
  <pre><code>    self.teamSearchController = ({
          let controller = UISearchController(searchResultsController: nil)
  
          controller.searchBar.searchBarStyle = UISearchBarStyle.Minimal
          controller.dimsBackgroundDuringPresentation = false
          controller.searchBar.sizeToFit()
         controller.searchBar.showsScopeBar = true
          self.tableView.tableHeaderView = controller.searchBar
  
          return controller
      })()
  </code></pre>
  
  <p>Controller:</p>
  
  <p><img src="https://i.stack.imgur.com/KQrhAm.png" alt="enter image description here"></p>
  
  <p>When I click on searchbar:</p>
  
  <p><img src="https://i.stack.imgur.com/xlnYkm.png" alt="enter image description here"></p>