を使用する必要があると思います
- (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldRecognizeSimultaneouslyWithGestureRecognizer:(UIGestureRecognizer *)otherGestureRecognizer
UIGestureRecognizer のデリゲートを使用して、同時に有効なジェスチャを定義します。
例えば:
- (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldRecognizeSimultaneouslyWithGestureRecognizer:(UIGestureRecognizer *)otherGestureRecognizer
NSLog(@"gestRecogn: %@ otherGestRec: %@",[[gestureRecognizer class] className],[[otherGestureRecognizer class] className]);
if ([[[gestureRecognizer class] className] isEqualToString:@"UIScrollViewPanGestureRecognizer"] && [[[otherGestureRecognizer class] className] isEqualToString:@"UILongPressGestureRecognizer"]) {
return FALSE;
}
if ([[[gestureRecognizer class] className] isEqualToString:@"UILongPressGestureRecognizer"] && [[[otherGestureRecognizer class] className] isEqualToString:@"UIScrollViewPanGestureRecognizer"]) {
return FALSE;
}
return TRUE;
}