Search code examples
iosnavigationcontroller

iOS how to remove back button?


I have an application with a navigation bar that pushes to a login screen view controller and then pushes to a main menu. Is there any way I can remove the back button off the main menu, so the user is unable to go back to the login screen?

Thanks!

EDIT: Using Xcode 4.3 and doing all the leg work programmatically.


Solution

  • You can do:

    [self.navigationItem setHidesBackButton:YES];
    

    In your second view controller (the one you want to hide the button in).