How to remove default navigation bar button

I use pushviewcontroller for navigation, and I get the default back button in the navigation bar ..... I'm trying to hide this default button and make my navigation bar simple ..... does anyone know how to hide this navigation button by default on the left side of the screen

+5
source share
3 answers

In the viewDidLoad method of the controller that is being called, you must set the navigationItem hidesBackButton property to YES:

- (void)viewDidLoad {
    [super viewDidLoad];

    self.navigationItem.hidesBackButton = YES;
}
+20
source

Try installing self.title = @"";just before using the pushViewcontroller method.

+1

Like the previous answer: set the property hidesBackButtonin the method viewDidLoad. You can also hide the back button in case of another action after loading the view using animations

[self.navigationItem setHidesBackButton:flag animated:flag]
+1
source

All Articles