jbearden jbearden - 2 months ago 12
iOS Question

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.

Answer

You can do:

[self.navigationItem setHidesBackButton:YES];

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