title: Make UISearchBar dismiss like Music App
body: <p>Notice how the <code>searchBar</code> magnifying glass and placeholder text both shift over on dismissal:</p>
  
  <p><img src="https://i.stack.imgur.com/zexrz.gif" width="300"></p>
  
  <p>Is there any way I could dismiss this search bar without the text and icon moving over? See the animation of the Music app for the animation I am trying to achieve.</p>
  
  <p>I have a <code>UISeachBar</code> that gets presented when the search button is clicked in a nav bar.</p>
  
  <pre><code>@IBAction func searchButtonPressed(sender: AnyObject) {
  
      searchController = UISearchController(searchResultsController: nil)
      searchController.searchResultsUpdater = self
      searchController.searchBar.delegate = self
      searchController.hidesNavigationBarDuringPresentation = false
      searchController.dimsBackgroundDuringPresentation = false
      presentViewController(searchController, animated: true, completion: nil)
  }
  </code></pre>
  
  <p>Now when the cancel button is pressed, I want the whole view to move up without seeing the SearchBar icon and placeholder text slide to the center of the searchBar as the view moves up off screen.</p>
  
  <p>I know there is the method <code>searchBarCancelButtonClicked(searchBar:)</code>, but this seems to automatically dismiss the SearchBar and I don't know how to control that. </p>
  
  <p>How can I make the SearchBar dismiss like the one in the Music app?</p>
  
  <p><strong>EDIT</strong>: Here is the only delegate method I am using:</p>
  
  <pre><code>func updateSearchResultsForSearchController(searchController: UISearchController) {
      masterFilter.removeAll()
      filterContentForSearchText(searchController.searchBar.text!)
      tableView.reloadData()
  }
  </code></pre>