如何在单击按钮时隐藏栏按钮项目?
在我的应用程序中,我说我有 2 个页面,点击第 1 页中的下一个按钮(使用推送视图控制器),它将导航到第 2 页,在第 2 页中,我有一个下载(UIButton,不在导航栏中)按钮,单击其中我需要隐藏后退按钮
如果后退按钮是由我们创建的,我们可以使用以下代码隐藏它
self.navigationItem.leftBarButtonItem = nil;
但我不知道如何隐藏后退按钮,任何人都可以帮助我,提前谢谢
in my app say i have 2 pages on click on next button(using push view controller) in page 1 it ill navigate to 2nd page , in the 2nd page i have a download(UIButton , not in the navigation bar) button , on click of that i need to hide the back button
if back button is created by us we can hide it by using the following code
self.navigationItem.leftBarButtonItem = nil;
but i am not getting how to hide that back button,,can any one help me, thanx in advance
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您可以使用以下代码隐藏后退按钮:
有关更多详细信息,请参阅此答案:
如何隐藏 UINavigationController 中的“后退”按钮?
You can hide the back button using the following code:
See this answer for more details:
How to hide the "back" button in UINavigationController?
你可以做...
self.navigationItem.hidesBackButton = YES;
You can do...
self.navigationItem.hidesBackButton = YES;