The given problem
I have the following view that includes a Navigation Bar, Search Bar and table view - the left picture is the given view I have and the right one is what I want to achieve - basically just hide the navigation bar and resize everything.
The current solution
Currently I've managed to hide and resize everything using a vertical-space constrain from the search box to the superview top property -
- The default constraint constant is 44 (the navigation bar height)
- After clicking the search box I hide the navigation bar and set the constraint constant to be 0
- When I stop searching I restore the navigation bar and set the constraint to 44 again
What I want
I'm looking for the easiest way to hide the navigation bar and resize the search box + table to fill the whole screen.
Is there any way to do it and take advantage of the iOS 6 auto-layout system?
My current solution feels unnatural.