Context: There's a map view with a UISearchController implemented. The search controller displays its results in a different table view controller
I found this answer 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
let resultsPage = ResultsTableViewController()
let searchController = UISearchController(searchResultsController: resultsPage)
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?