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 ?
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
- (void)viewDidLoad
{
UITapGestureRecognizer *gr = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(UIviewTapped:)];
[yourUIview addGestureRecognizer:gr];
}
-(void) UIviewTapped:(UIView *)view
{
// write touched code here.
}