I have an application with a UITabBarController in a UINavigationController . ( UITabBarController not the "Initial View Controller" for the history pane.)
In the initial UIViewController , I have a UISearchController that allows me to search for content from a remote source.
This worked fine until I added a UITabBarController . Now the search bar is displayed normally in the default state, but as soon as you start typing it inside, it gets up the top edge of the view.
I understand that this probably has a lot in common with automaticallyAdjustsScrollViewInsets , extendedLayoutIncludesOpaqueBars and / or edgesForExtendedLayout , but in all my settings I was unable to find a magic combo to get the UISearchController so as not to push myself to the top of the view.
Any ideas on how to make it work?
See these screengrabs from this sample project :
Initial View:

The search text field becomes the first responder:

After entering a word and pressing, enter:

source share