I am trying to implement the UISearchController in my current project and I am struggling to correctly position its UISearchBar on my ViewController.
On my ViewController, I have a UIView that is used as a container view for the searchControllers searchBar. When the searchController is created, I add its searchBar as a subView of the ViewControllers container view. The ViewController is also embedded in a NavigationController, whose Navbars color is red.
The issue that I am having is when I active the search controller, by focusing on the searchBar, after the animation occurs the pushes the Navbar off of the screen, and fixes the searchBar to where the navBar once was, the background of the searchBar doesn't extend to cover the status bar.
The dark gray strip at the top of the View Controllers view is a mixture of the dimming view that comes with UISearchController and the white background where the red navigation bar once was.
Please let me know if you have any insight on this issue, or if you need more information.