Show UISearchController's SearchResultsController on SearchBar Tap
问题 I am using UISearchController not UISearchDisplayController, and I want to show SearchResultController on SearchBar Tap right away. Right now it's showing like this (when I tap on the search bar): 回答1: When results are empty, UISearchController 's viewController is still hidden. That's why we have to fiddle our way around using UISearchControllerDelegate 's willPresentSearchController: After initializing self.searchController make your ViewController conform to `UISearchControllerDelegate: