Activate UISearchBar when the controller is loaded
<p>I have the following SearchController:</p>

<pre><code>class SearchController: UITableViewController, UISearchResultsUpdating
</code></pre>

<p>The implementation works well, but I have to tap on the search bar to start searching every time I load the controller. What I'd like is to activate the search bar once SearchController is loaded. I have tried with:</p>

<pre><code>override func viewDidLoad() {
    super.viewDidLoad()

    ...
    ...

    self.resultSearchController.searchBar.becomeFirstResponder()
}
</code></pre>

<p>I also tried with:</p>

<pre><code>override func viewDidAppear(animated: Bool) {
    self.resultSearchController.searchBar.becomeFirstResponder()
}
</code></pre>

<p>But the search bar remains deactivated and the keyboard won't show up. What am I missing? Thanks!</p>