I am using UISearchController
(not UISearchDisplayController
), i wanted to show a separate view when search is active. I dont want to use the current view.
Tried with self.searchController = UISearchController(searchResultsController: self.resultsController )
. But this doesn't show anything.
Even tried this
func presentSearchController(_ searchController: UISearchController) {
DispatchQueue.main.async {
searchController.searchResultsController?.view.isHidden = false
}
}
func didPresentSearchController(_ searchController: UISearchController) {
searchController.searchResultsController?.view.isHidden = false
}
My default table data before search is active is as below, i want this table to hide and show separate view and pass the typed keyword to that new view. How can i achieve this?