开发者

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?


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.


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;
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜