Nikita
Nikita

Reputation: 154

Navigation bar in iOS

I have such ViewControllers enter image description here

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

Answers (2)

Kathiravan G
Kathiravan G

Reputation: 487

- (void)viewWillAppear:(BOOL)animated
{
    [super viewWillAppear:animated];
    [self.navigationController setNavigationBarHidden:YES];
}

Upvotes: 3

Wyetro
Wyetro

Reputation: 8588

You need to put the following method:

self.navigationController.navigationBar.hidden = YES;

into your

- (void) viewWillAppear:(BOOL)animated

Upvotes: 1

Related Questions