tags:

views:

339

answers:

2

Hi,

I use Search Display Controller to do the search. I follow the TableSearch sample from Apple.

In searchBarTextDidBeginEditing: I put [self.searchDisplayController setNavigationBarHidden:NO animated:YES] to keep navigation bar showing, but this doesn't work. Navigation bar gets pushed to the top when the keyboard shows.

Is there a way to keep navigation bar staying on the page when the keyboard is first shown?

Thanks,

Ted

A: 

There may be a better solution, but this is what I'm using right now. The navigation bar does get covered up at first, but this makes it slide back in right away:

- (void)searchDisplayControllerDidBeginSearch:(UISearchDisplayController *)controller {
    [self.navigationController setNavigationBarHidden:NO animated:YES];
}
Jawboxer