Hi,
I have a controlled contained in a split view controller primary controller with a UISearchController assigned in navigationItem.searchController.
On iPhone the search bar is directly displayed in the navigation bar. This is want I want.
But on iPad, the search bar is hidden and a search button is displayed in the top right of the navigation bar. In order to display the search bar the user must click on the icon to display the search bar.
I want the search bar to always be visible, like on iPhone. How can I achieve that?
This is the code I use to include the UISearchController:
let searchController = UISearchController(searchResultsController: nil)
searchController.searchResultsUpdater = self
searchController.obscuresBackgroundDuringPresentation = false
searchController.hidesNavigationBarDuringPresentation = false
navigationItem.searchController = searchController
navigationItem.hidesSearchBarWhenScrolling = false
And this is the result on both devices:
Thank you