Whenever a user begins editing a UISearchDisplayController
\'s search bar, the search controller becomes active and hides the view\'s navigation bar while presen
I think the best solution is to implement the UISearchDisplayController yourself.
It's not that difficult. You only need to implement UISearchBarDelegate for your UIViewController and include a UITableView to display your search results.
Tried this a different way, without subclassing UISearchDisplayController. In your UIViewController class where you set the delegate for UISearchDisplayController, implement searchDisplayControllerDidBeginSearch: and add use
[self.navigationController setNavigationBarHidden:NO animated:YES];
Did the trick for me, hope that helps.
The simplest solution and no hacks.
@interface MySearchDisplayController : UISearchDisplayController
@end
@implementation MySearchDisplayController
- (void)setActive:(BOOL)visible animated:(BOOL)animated
{
[super setActive: visible animated: animated];
[self.searchContentsController.navigationController setNavigationBarHidden: NO animated: NO];
}
@end