问题描述
我试图通过在我的 viewDidLoad 方法中添加以下几行来隐藏导航控制器中的后退按钮.之前关于 SO 的许多其他答案都说这很有效,所以我不知道我的问题是什么?iOS 7/Xcode 5 可能有什么新东西?
I have tried to hide the back button in my navigation controller by adding the following lines to my viewDidLoad method. Many other previous answers on SO have said this works, so I don't know what my problem is? Maybe something new with iOS 7 / Xcode 5?
self.navigationItem.hidesBackButton = YES;
self.navigationController.navigationItem.hidesBackButton = YES;
推荐答案
我也遇到过类似的问题.这仅在您没有自定义 导航栏 时有效.以下任何一种都可以.
I too had faced similar issue.
This will work only when you have not customized your Navigation bar.
Either one of the below one will work.
[self.navigationItem setHidesBackButton:YES animated:YES]; OR
[self.navigationItem setHidesBackButton:YES];
请检查您是否在iOS 7中获得了Back",然后上面的就可以了.
Please check whether your getting "Back" in iOS 7, then the above will work.
希望这将帮助您确定问题
Hope this will help you to identify the issue
这篇关于隐藏导航控制器后退按钮 iOS 7的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!


大气响应式网络建站服务公司织梦模板
高端大气html5设计公司网站源码
织梦dede网页模板下载素材销售下载站平台(带会员中心带筛选)
财税代理公司注册代理记账网站织梦模板(带手机端)
成人高考自考在职研究生教育机构网站源码(带手机端)
高端HTML5响应式企业集团通用类网站织梦模板(自适应手机端)