Reputation: 154
I have such ViewControllers
After registration user is moved to RevealViewController
UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"Main" bundle:nil];
SWRevealViewController *revealViewController = (SWRevealViewController *)[storyboard instantiateViewControllerWithIdentifier:@"revealViewControllerID"];
[self.navigationController pushViewController:revealViewController animated:YES];
and then goes to Main View Controller with own top bar, but it is not shown, because there appears navigation bar with 'back button' (see image). How can i remove this navigation bar to see my top bar?
I found a lot of SO pages with similar question, but no one solution has been able to remove navigation bar.
Upvotes: 0
Views: 94
Reputation: 487
- (void)viewWillAppear:(BOOL)animated
{
[super viewWillAppear:animated];
[self.navigationController setNavigationBarHidden:YES];
}
Upvotes: 3
Reputation: 8588
You need to put the following method:
self.navigationController.navigationBar.hidden = YES;
into your
- (void) viewWillAppear:(BOOL)animated
Upvotes: 1