I have a view controller that is embedded in a UINavigationController,how can I hide the UINavigationBar? I want the navigation functionality but I don't want that bar in the top..
tnx
I have a view controller that is embedded in a UINavigationController,how can I hide the UINavigationBar? I want the navigation functionality but I don't want that bar in the top..
tnx
This should work:
[self.navigationController setNavigationBarHidden:YES animated:YES];
to get it back, just call:
[self.navigationController setNavigationBarHidden:NO animated:YES];
To hide navigationBar you can use below code
[self.navigationController setNavigationBarHidden:YES animated:YES];
To Unhide navigationBar you can use below code
[self.navigationController setNavigationBarHidden:NO animated:YES];
By implement this code in your ViewController you can hide specific viewController Actually the trick is , hide the navigationBar when that Controller is launched
- (void)viewWillAppear:(BOOL)animated {
[self.navigationController setNavigationBarHidden:YES animated:YES];
[super viewWillAppear:animated];
}
and unhide the navigation bar when user leave that page do this is viewWillDisappear
- (void)viewWillDisappear:(BOOL)animated {
[self.navigationController setNavigationBarHidden:NO animated:YES];
[super viewWillDisappear:animated];
}