1.解决了防止点击小的view也触发的问题(在大的view上有个小的view,手势添加在大的view上面)
- (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldReceiveTouch:(UITouch *)touch{
if ([touch.view isDescendantOfView:self.smallView]) {
return NO;
}
return YES;
}
网友评论