掩码UIView触摸检测 [英] Mask UIView Touch Detect

查看:101
本文介绍了掩码UIView触摸检测的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个很大的框架,通过它我掩盖了一个较小的视图
现在我想检测只是较小的一个但触摸开始不允许我过滤蒙面视图
任何指针?

I have a big Frame through which i masked a smaller view now i want to detect just smaller one but touches began did not allow me to filter masked view any pointers ?

推荐答案

- (void)viewDidLoad
{

 UITapGestureRecognizer *gr = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(UIviewTapped:)];
 [yourUIview addGestureRecognizer:gr];

}

-(void) UIviewTapped:(UIView *)view
{

  // write touched code here. 

}

这篇关于掩码UIView触摸检测的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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