Reputation: 11
I have 8 view controllers embedded into 1 navigation controller. I'd like to hide the navigation bar (keeping status bar) on my first view controller. When I've tried to do this this, the navigation bar disappears on all my view controllers.
Upvotes: 0
Views: 578
Reputation: 13302
Try this in the first view controller:
- (void)viewWillAppear:(BOOL)animated {
[super viewWillAppear:animated];
[self.navigationController setNavigationBarHidden:YES animated:animated];
}
- (void)viewWillDisappear:(BOOL)animated {
[self.navigationController setNavigationBarHidden:NO animated:animated];
[super viewWillDisappear:animated];
}
Upvotes: 2