How to hide NavigationController on TabBar based iPhone app?
I'm building a TabBar based iPhone app. I'm using xcode 4 and I add Navigation Controller as one of 开发者_如何转开发the item. It allows me to disable the Navigation Bar on the startup. I basically uncheck the Shows Navigation Bar.
Navigation Bar does not show on the start up. But once I navigate to the detail view and come back Navigation Bar is showing again. Please help where can I disable the Navigation bar?
Update
Guys I'm using tabBar based app and for some reason it never get into the ViewDidLoad or viewWillAppear.
In your viewWillAppear method of the view controller set [self.navigationController setNavigationBarHidden:YES];
Everytime your viewController calls viewWillAppear it will setNavigationBar to hidden
Try:
- (void)viewDidLoad
{
[super viewDidLoad];
self.navigationController.navigationBarHidden = YES;
}
put below code in your app delegate class in didFinishLaunching method :
self.navigationController.navigationBarHidden = YES;
精彩评论