1、遵守代理 UIGestureRecognizerDelegate
2、实现代理方法
- (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldReceiveTouch:(UITouch *)touch
{
if ([touch.view isDescendantOfView:self.pickerBgView]) {
return NO;
}
return YES;
}
1、遵守代理 UIGestureRecognizerDelegate
2、实现代理方法
- (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldReceiveTouch:(UITouch *)touch
{
if ([touch.view isDescendantOfView:self.pickerBgView]) {
return NO;
}
return YES;
}
本文标题:子视图不影响父视图的手势识别
本文链接:https://www.haomeiwen.com/subject/rxeyattx.html
网友评论