title: How do I use UISearchController in iOS 8 where the UISearchBar is in my navigation bar and has scope buttons?
body: <p>I'm trying to use the new <code>UISearchController</code> from iOS 8, and embed its <code>UISearchBar</code> in my <code>UINavigationBar</code>. That's easily done as follows:</p>
  
  <pre><code>searchController = UISearchController(searchResultsController: nil)
  searchController.searchResultsUpdater = self
  searchController.delegate = self
  searchController.searchBar.delegate = self
  searchController.dimsBackgroundDuringPresentation = false
  searchController.hidesNavigationBarDuringPresentation = false
  navigationItem.titleView = searchController.searchBar
  </code></pre>
  
  <p>But when I add the scope buttons:</p>
  
  <pre><code>searchController.searchBar.showsScopeBar = true
  searchController.searchBar.scopeButtonTitles = ["Posts, Users, Subreddits"]
  </code></pre>
  
  <p>It adds the buttons behind the <code>UISearchBar</code> and obviously looks very odd.</p>
  
  <p>How should I be doing this?</p>