title: How do I dismiss a UISearchController view?
body: <p>Context: There's a map view with a UISearchController implemented. The search controller displays its results in a different table view controller</p>
  
  <p>I found <a href="https://stackoverflow.com/questions/28438373/how-do-you-dismiss-a-uisearchcontroller-ios-8-ios9">this answer</a> which explains how to dismiss the search controller within the same view. However, my results page is a different view than its origin page. I have</p>
  
  <pre><code>let resultsPage = ResultsTableViewController()
  let searchController = UISearchController(searchResultsController: resultsPage)
  </code></pre>
  
  <p>So now when the search controller gets results, it displays them on the table view controller. When the user selects one of the results, I want to dismiss this view and go back to the map view, passing their selection along. Should I do this with a segue, or is there a better programmable approach?</p>