I’m not sure how this works. I have a UITabBarController where my first tab is a UiNavigationController and its rootViewController has a UISearchDisplayController and UISearchBar. I set the rootViewController to be the UINavigationControllerDelegate.
I do this:
- (void)navigationController:(UINavigationController *)navigationController willShowViewController:(UIViewController *)viewController animated:(BOOL)animated {
[self.navigationController.navigationBar setHidden:YES];
}
So my navigationBar will not show. That part works. After I make a search though and press enter, the navigation bar then comes in and pushes my search bar below it. What is happening here? Is there somewhere else I need to prevent the navigation bar from showing?
I know I could present my view controller modally instead since that is what I used to do. But there was no reason for it to be presented modally other than the navBar problem. Once the search is made and the user selects something to go to a more detailed view of the item, then I used to create a navigationController there. It seemed like it would flow better if I Just had one UINavigationController at the root since like I said, there is no reason to present the detailed list modally. Thanks!
Try replacing
with