i am using a pushviewcontroller for navigation and i am getting default back button on the navigation bar..... i am trying to hide that default button and make my navigation bar plain.....anybody know how to hide that default navigation button on left side of the screen
The option to disable Navigation bar can be set via Settings > Navigation Bar. When disabled, Home, Back, and Recents buttons will be removed from the screen, allowing more room for app use.
To hide the back button on navigation bar we'll have to either set the navigation button as nil and then hide it or hide it directly. Let's create a project, add 2 view controller and Embed them in navigation controller.
In the viewDidLoad method of the view controller that is being pushed, you should set the hidesBackButton property of the navigationItem to YES:
- (void)viewDidLoad {
[super viewDidLoad];
self.navigationItem.hidesBackButton = YES;
}
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