Jason
Jason

Reputation: 14605

How to disable UINavigationController?

I have a navigation controller-based app in which I would like to temporarily disable the navigation controller (top left button) at a certain point in the app so that the user can't get out of the view while I'm uploading a file. Is there a way to disable the "back" button so that users can't get out of the view?

Upvotes: 0

Views: 1805

Answers (2)

In the view controller pushing into the view where you want to hide the back button (NOT in the view controller where you want the back button hidden), do:

self.navigationItem.hidesBackButton = YES;

Upvotes: 0

Seamus Campbell
Seamus Campbell

Reputation: 17906

You could hide the navigation bar entirely with

- (void)setNavigationBarHidden:animated:

in the appropriate views.

I don't know of an Apple-approved way to disable or otherwise interact with the back button.

Upvotes: 1

Related Questions