我的UISearchController有问题。我不能正确地将它与tableView联系起来。
成果表未涵盖主表的整个领域:

resultsTableController = ScuoleSearchResultsTableController()
resultsTableController.tableView.delegate = self
searchController = UISearchController(searchResultsController: resultsTableController)
searchController.searchResultsUpdater = self
searchController.searchBar.sizeToFit()
tableView.tableHeaderView = searchController.searchBar
searchController.delegate = self
searchController.dimsBackgroundDuringPresentation = true // default is YES
searchController.searchBar.delegate = self // so we can monitor text changes + others
// Search is now just presenting a view controller. As such, normal view controller
// presentation semantics apply. Namely that presentation will walk up the view controller
// hierarchy until it finds the root view controller or one that defines a presentation context.
definesPresentationContext = true发布于 2014-12-15 11:18:26
信不信由你,我只是通过标记UINavigationController设置来解决问题:
UINavigationBar.translucent = true谢谢你的回复
https://stackoverflow.com/questions/27471345
复制相似问题