UIBarButtonItem,设置专属触摸 [英] UIBarButtonItem, set exclusive touch
本文介绍了UIBarButtonItem,设置专属触摸的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
有没有办法让 UIBarButtonItem
独家触摸?目前您可以同时选择多个,但它不断使我的应用程序崩溃.
Is there a way to make UIBarButtonItem
exclusive touch? At the moment you can select multiple at the same time and it keeps crashing my application.
推荐答案
比子类化导航栏稍微简单的方法,但思路相同;
Slightly easier method than subclassing the navbar but the same idea;
for(UIView *temp in self.navigationController.navigationBar.subviews)
{
[temp setExclusiveTouch:YES];
}
在添加条形按钮项之后放置它.
Put this just after you add your bar button items.
这篇关于UIBarButtonItem,设置专属触摸的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文