As I understand, the default behaviour of UISearchController
is:
Swift 3 Version:
If your searchResultController
is not nil and you are using a separate table view controller to show the search results, then you can make that table view controller conform to UISearchResultUpdating
and in the updateSearchResults
function, you can simply unhide the view.
func updateSearchResults(for searchController: UISearchController) {
view.hidden = false
}
Swift 4 Version:
func updateSearchResults(for searchController: UISearchController) {
view.isHidden = false
}