iGagan Kumar
iGagan Kumar

Reputation: 406

Hide the back button on navigation bar is iOS6

want to hide the back button navigation bar, I have tried the below all statements but none of them worked for me

[self.navigationController.navigationItem setHidesBackButton:YES]; //1
[self.navigationController.navigationBar.backItem setHidesBackButton:YES]; //2
self.navigationController.navigationItem.hidesBackButton = TRUE;  //3
[self.navigationItem setHidesBackButton:YES animated:YES]; //4
 self.navigationItem.hidesBackButton = NO; //5

Upvotes: 0

Views: 4428

Answers (3)

Dharmbir Singh
Dharmbir Singh

Reputation: 17535

Try to see your 5th statement that you have set NO So please change it.It will work fine.

 self.navigationItem.hidesBackButton = YES; //5

Upvotes: 0

Nikos M.
Nikos M.

Reputation: 13783

Try this:

[self.navigationController.topViewController.navigationItem setHidesBackButton:YES];

Upvotes: 2

shankar
shankar

Reputation: 614

try this,

- (void)viewDidLoad
{
[super viewDidLoad];
self.navigationItem.leftBarButtonItem=nil;
self.navigationItem.hidesBackButton=YES;
}

Upvotes: 6

Related Questions