I am trying to display a simple search screen for my iphone app using a UISearchController. I used a UITableViewController and a UISearchController that I embedded inside a UINavigationController
- This get me the following screen (state 1)
- When user click on the search field I get the screen below (state 2): The search bar display nicely at the top of the screen below the status bar.
What I want to do is to get state 2 straight away without going to state 1
I tried to add this code
presentViewController(searchController, animated: true, completion: nil)
but it either does not show the searchbar if animated is false or display it as I want but after an unnecessary transition that temporaryly shows the navigation bar