UISearchResultController under my UISearchBar

209 Views Asked by At

The problem is as it is on the image below:

enter image description here

My searchResultController is a subclass of UITableViewController and is under my UISearchBar:

This is how I custom this:

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 to fix that problem?

0

There are 0 best solutions below