- (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldRecognizeSimultaneouslyWithGestureRecognizer:(UIGestureRecognizer *)otherGestureRecognizer
{
if ([otherGestureRecognizer.view isMemberOfClass:[UIScrollView class]]) {
NSLog(@"NO");
//禁止otherGestureRecognizer手势
return NO;
}
else {
NSLog(@"yes");
//两手势同时起效
return YES;
}
}
网友评论