后退按钮未显示在 UINavigationController 上
我有3个观点。第一个是登录,第二个是菜单,第三个是菜单各部分的结果。我希望当用户登录时,后退按钮不会出现在第二个视图中。这部分有效,但是当我浏览第三个视图时,它也被隐藏了。我创建了第四个视图,当我输入时,会出现后退按钮,它让我返回到第二个视图。
为了隐藏后退按钮,我仅在第二个视图中设置了此按钮:
- (void)viewDidLoad {
self.navigationItem.hidesBackButton = YES;
}
我也尝试在第三个视图中设置相反的按钮,但它没有显示。
为什么它没有显示在第三个视图上?
I have 3 views. The first is a login, the second is a menu, and the third is the result of each part of the menu. I want that when the user logs in, the back button won't appear in the second view. This part works but when I go through the third view, it is hidden too. I've created a fourth view and when I enter, the back button appears and it lets me go back until the second view.
For hiding the back button, I've set this only in the second view:
- (void)viewDidLoad {
self.navigationItem.hidesBackButton = YES;
}
I've also tried to set the opposite in the third view and it don't show.
Why it is not showing on the third view?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
在第二个ViewController中执行此操作(在登录之后)
do this in secondViewController(after the login one)