I have a ViewController nested inside a PageViewController which is also nested inside a NavigationViewController.
The thing is I have put a UISearchBar and UISearchDisplayController item on the center of my ViewController and for some reason, when I click on the search bar and the keyboard appears, the UISearchBar goes up to where the NavigationBar is. Also, when I click outside the UISearchBar, it dissapears with a fading effect.
Could someone explain to me what is going on? How can I fix the position of the UISearchBar so that it does not go up?
I tried a similar UISearchBar and UISearchDisplayController on an empty project with a single ViewController and the UISearchBar does not dissapear and does not move up. From this I believe that for some reason the UISearchBar moves up in the presence of a NavigationBar, which acts like a magnet.