Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to Remove the default navigation bar button

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

like image 300
Gani Avatar asked Nov 04 '09 07:11

Gani


People also ask

How do I disable the Navigation bar button?

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.

How to hide navigation back button in iOS?

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.


1 Answers

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;
}
like image 137
gerry3 Avatar answered Sep 17 '22 18:09

gerry3