0

Scene is with Storyboard, here is the Structure UINavigationController > NavigationController > UITabBarController > UIViewController

I am trying below options to hide back button over to last UIViewController but it doesn't work.

self.navigationItem.leftBarButtonItem=nil;
self.navigationItem.backBarButtonItem=nil;
self.navigationController.navigationItem.leftBarButtonItem=nil;
self.navigationController.navigationItem.backBarButtonItem=nil;
self.navigationController.navigationBar.backItem.hidesBackButton=YES;
self.navigationController.navigationItem.hidesBackButton=YES;
self.navigationItem.hidesBackButton=YES;

Can anyone help or let me know what I am doing wrong?

Rohit Mandiwal
  • 10,258
  • 5
  • 70
  • 83
  • do you need the navigation bar? you could try hiding it with this [[self navigationController]setNavigationBarHidden:YES animated:YES]; – gg13 Jan 27 '13 at 20:33
  • Thanks gg13, I figured out the solution and the cause due to which I suck. I added it as answer to my question. – Rohit Mandiwal Jan 28 '13 at 05:39

1 Answers1

3

Alright, I got my answer.

self.tabBarController.navigationItem.hidesBackButton=YES;

As I am using UITabBarController, I should do this and using this, actually solved my issue.

Rohit Mandiwal
  • 10,258
  • 5
  • 70
  • 83