UINavigationBar 系统类型按钮被禁用
我使用 UINavigationController 作为我的视图控制器。在 init() 或 viewDidLoad() 中,我设置:
self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc]
initWithBarButtonSystemItem:UIBarButtonSystemItemEdit
target:self action:@selector(selector)];
在显示或推送视图时,禁用右栏按钮(如果有,则禁用左栏按钮)。但如果我用自定义按钮替换它就可以正常工作。
self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc]
initWithImage:image title:nil
target:self action:@selector(selector)];
我认为这是我在这里提出其他问题的根本原因:
MFMailComposeViewController 导航栏按钮被禁用
有人有想法吗? 提前致谢!
I use UINavigationController for my view controller. In init() or viewDidLoad(), i set :
self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc]
initWithBarButtonSystemItem:UIBarButtonSystemItemEdit
target:self action:@selector(selector)];
While present or push view, right bar button (and left if have) is disabled. But if I replace by custom button then it's worked normally.
self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc]
initWithImage:image title:nil
target:self action:@selector(selector)];
I think this is root cause of my other question here :
MFMailComposeViewController navigation bar buttons are disabled
Does anyone has ideas?
Thanks in advance!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
启用编辑按钮项的正确方法是:
其他
UIBarButtonItemSystemItem
也会出现这种情况吗?The proper way to enable the edit button item is:
Does this also occur with other
UIBarButtonItemSystemItem
s ?