I am using UISearchController to provide a search functionality in my app. The user can type for location, or if clicks on Use current location, i will get the location.
But when clicking on Search, the editable search field and cancel button appear and dim the background. The table view appears only on typing a character.
How do i display the table view as soon as user clicks on Search?
The way I am creating a UISearch controller here is like this:
let locationController = UISearchController(searchResultsController: locationSearchController)
locationController.searchBar.delegate = self
self.presentViewController(locationController, animated: true, completion: nil)
Note: I am not using UISearchResultsUpdating method. I am using custom delegate to reload the table view from the parent ViewController.
I want to show Last 2 options in the 2nd image as soon as user clicks Search See attached snapshots.