Mask UIView Touch Detect [closed]

2019-02-25 21:12发布

i get this view after masking.View size is 310 width 310 height.i just want to detect toch on black AreaI 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 ?

1条回答
爱情/是我丢掉的垃圾
2楼-- · 2019-02-25 21:43
- (void)viewDidLoad
{

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

}

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

  // write touched code here. 

}
查看更多
登录 后发表回答