I am having two viewControllers , I am navigating from the FirstView to SecondView , by
pushing the SecondView to the navigation controller. Since I don't want the navigation bar
to be shown in the SecondView , I do the following
self.navigationController.navigationBar.hidden=YES;
Then I move back from the, secondView to the FirstView as follows
[self.navigationController popViewControllerAnimated:YES];
But now the navigation Bar is not shown in the FirstView as well since I am hiding it in the
SecondView. I am trying to the following in the FirstView
-(void)viewWillAppear:(BOOL)animated
{
[super viewWillAppear:YES];
self.navigationController.navigationBar.hidden=NO;
}
Try this instead:
- (void) viewWillAppear:(BOOL)animated
{
[self.navigationController setNavigationBarHidden:NO animated:NO];
[super viewWillAppear:animated];
}
You set initWithNib or viewDidLoad method and run it
-(void)viewDidLoad
{
self.navigationController.navigationBar.hidden=NO;
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With