0
我正在使用UISearchController
(不是UISearchDisplayController
),我想在搜索處於活動狀態時顯示單獨的視圖。我不想使用當前視圖。如何在UISearchController中顯示不同的searchResultsController
試用self.searchController = UISearchController(searchResultsController: self.resultsController)
。但是這並沒有表現出什麼。
即使想這
func presentSearchController(_ searchController: UISearchController) {
DispatchQueue.main.async {
searchController.searchResultsController?.view.isHidden = false
}
}
func didPresentSearchController(_ searchController: UISearchController) {
searchController.searchResultsController?.view.isHidden = false
}
我的默認表數據之前,搜索是積極的,如下,我想這個表格來隱藏和顯示不同的視圖和輸入關鍵字傳遞給新的看法。我怎樣才能做到這一點?