Swift - UISearchController with separate searchResultsController : <p>I'm trying to figure out how to use UISearchController when you want to display the results in a separate searchResultsController - every single guide, video and tutorial I've found have all used the current viewController to present the search results, and instantiate UISearchController like so:</p>

<pre><code>let searchController = UISearchController(searchResultsController: nil)
</code></pre>

<p>but I want to dim the view and present a new tableView with the search results, in the same way done on the App Store search. So what I've done is created a new tableViewController, given it a storyboard id, and then instantiated it like so:</p>

<pre><code>let storyboard = UIStoryboard(name: "Main", bundle: nil)
let resultsController = storyboard.instantiateViewController(withIdentifier: "searchResults") as! UITableViewController
let searchController = UISearchController(searchResultsController: resultsController )
</code></pre>

<p>which seems to work. However, I'm pretty stuck from here on out. I have no idea how to display the search results in the resultsController, what to put in cellForRowAtIndexPath in the resultsController and so on.</p>

<p>Any help is appreciated!</p>
