My question is simple, How to hide back button in navigation bar? I see similar question here in stack overflow but
self.navigationItem.hidesBackButton = YES;
not working for me. I am using below code because RootViewController is my Singleton class.
Thanks
i still use both in viewDidLoad but both are not working
[RootViewController sharedFirstViewController].navigationItem.hidesBackButton = YES;
[RootViewController sharedFirstViewController].navigationItem.backBarButtonItem=nil;
Try
self.navigationItem.backBarButtonItem.hidden = YES;orself.navigationItem.backBarButtonItem = nil;Place one of these either in
viewWillAppear:,viewWillLoadorviewDidAppear:of the class you want to get rid of the back button in.