UISearchBar and UINavigationController

Posted by Calvin L on Stack Overflow See other posts from Stack Overflow or by Calvin L
Published on 2010-05-25T06:36:59Z Indexed on 2010/05/25 6:41 UTC
Read the original article Hit count: 581

Filed under:
|

I have an .xib file connected to a ViewController, which is init'ed as the root controller of an instance of UINavigationController in my appDelegate.

In that view, I have a UISearchBar and a UITableView below it.

When the view loads up, there's a navigationBar at the top, followed by a ~20 pixel gap, and then the UISearchBar, and the table beneath it:

My problem is that when I enter the UISearchBar to type something, the navigation bar disappears (which is fine), but the search box is all screwy:

I'm pretty new to this (a couple of weeks), so I'm not quite sure what's going on. Can anyone help me shed some light on this?

© Stack Overflow or respective owner

Related posts about objective-c

Related posts about cocoa-touch