objective c如何为整个应用程序上的所有UI按钮设置独占触摸 [英] objective c how to set exclusive touch for all UIbuttons on the whole app

查看:69
本文介绍了objective c如何为整个应用程序上的所有UI按钮设置独占触摸的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的应用程序在应用程序中有很多按钮

My app has many buttons through out the application

我想一次性将所有这些按钮设置在一起。或应用中的所有观看次数

我们可以单独设置

[button setExclusiveTouch:YES];

但我想一次设置应用程序中的所有按钮

But i want to set at a time for all the buttons in the application

我们可以设置所有视图独家触摸吗?

任何机构有任何想法请建议我。

any body have any idea please suggest me.

推荐答案

你可以试试这个

// Not tested
for (UIView * button in [myView subviews]) {
    if([button isKindOfClass:[UIButton class]])
        [((UIButton *)button) setExclusiveTouch:YES];
}

这篇关于objective c如何为整个应用程序上的所有UI按钮设置独占触摸的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆