I have set the search controller of my navigation item, so that the search bar is positioned at the top of the screen. What I want to happen is that the search bar is in the 'title view' position like what used to happen on iOS 10. However, the search bar is moved down to make space for a large title for the view controller. How can I hide this extra space?
navigationItem.searchController = searchController
Sorry for a late reply, but try the following
instead of
navigationItem.searchController = searchController
. Hope it will help!