Navigation bar disappears when pushing to the next viewController
Currently the home page of my application hides the navigation bar;
however, whenever I attempt to push that controller over to the next
viewController it also hides that navigation bar too. I currently have
this is the view controller WITHOUT a navigation bar:
[self.navigationController pushViewController: mapView animated:YES];
Whenever this pushes to the next one it does not have one anymore. The
next viewController's navigation bar is in the viewWillAppear method, so
it should show up. Any ideas?
ANSWER:
If you hide your navigation bar in a ViewController and wish to show it in
the next one then use the following code:
someVC *VC = [someVC alloc] init];
self.navigationController.navigationBarHidden=NO;
[self.navigationController pushViewController: someVC animated:YES];
Thank you!
No comments:
Post a Comment