I have a navigation controller (navC) and I have a view controller (ViewC) which is a view pushed from root controller. I have hidden back button for ViewC with code:
[[self navigationItem] setHidesBackButton:YES];
I have pushed tab bar controller (tabbarC) after ViewC . In the view controller associated with the first tab in tabbarC I have tried hiding the back button with the code:
[[[self tabBarController] navigationItem] setHidesBackButton:YES];
But the back button is still visible When i click it; it disappears... can any one help me hiding the back button for all the views in the tabbarC.
In your first view that will appear when you push to your tabbarviewcontroller set this
-(void)viewWillAppear:(BOOL)animated{
[super viewWillAppear:animated];
self.tabBarController.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