I’ve tried various ways of hiding the back button of my UINavigationController
UINavigationController RVC = new UINavigationController();
other code
RVC.NavigationItem.SetHidesBackButton(true,true);
and other similar ways, but none of them have actually hidden the back button. Does anyone know what I’m doing wrong?
Use
this.NavigationItem.SetHidesBackButton(true,true);within the controller that it is pushed in the navigation controller. You could overrideViewWillAppearand put the code there like:Hope it helps.
A simple note
Since the navigation bar is unique for a
UINavigationController, the button will maintains its state for all the controllers you push in the navigation controller. To explain the concept suppose you have two controllers, say A and B. You first push A and in itsViewWillAppearmethod you hide the button. When you push B, the button still remains not visible. If you want to unhide the button in B, you can play with itsViewWillAppearmethod (like before) and so on…