我的UISearchBar下的UISearchResultController

时间:2015-06-24 08:22:23

标签: swift uisearchbar uisearchcontroller

问题出现在下图中:

enter image description here

我的 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)
}

如何解决这个问题?

0 个答案:

没有答案