UISearchResultController under my UISearchBar

The problem is the same as in the image below:

enter image description here

My searchResultController is subclassed UITableViewController

and under mine UISearchBar

:

This is how I set it up:

private func setupSearchController() {
    searchResultController = storyboard!.instantiateViewControllerWithIdentifier(DBSearchResultControllerIdentifier) as! DBSearchResultController
    searchResultController.delegate = self

    searchController = UISearchController(searchResultsController: searchResultController)
    searchController.searchBar.frame = CGRectMake(0, 0, view.bounds.size.width, 44.0)
    searchController.searchResultsUpdater = self
    searchController.delegate = self

    searchBarContainerView.addSubview(searchController.searchBar)
}

      

How do I fix this problem?

+3


source to share





All Articles