问题出现在下图中:
我的 searchResultController 是UITableViewController
的子类,位于我的UISearchBar
下:
这是我自定义的方式:
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)
}
如何解决这个问题?