I implemented a search function for the UITableViewController as follows:
self.resultSearchController = ({ let controller = UISearchController(searchResultsController: nil) controller.searchResultsUpdater = self controller.dimsBackgroundDuringPresentation = false controller.searchBar.sizeToFit() self.tableView.tableHeaderView = controller.searchBar return controller })()
The problem I am facing is that if I click on it, my navigation bar and the title of the navigation controllers will disappear. Is there a solution to stop this behavior (in quick)?
Button not pressed:

Clicked:

source share