答案 0 :(得分:0)
- (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldRecognizeSimultaneouslyWithGestureRecognizer:(UIGestureRecognizer *)otherGestureRecognizer {
BOOL isAtLeastOneGestureInlineTextView = [self isInlineTextView:gestureRecognizer.view] || [self isInlineTextView:otherGestureRecognizer.view];
if ((gestureRecognizer == [self longPressGesture]) && !isAtLeastOneGestureInlineTextView) {
return NO;
}
if (gestureRecognizer == [self panGesture]) {
return NO;
}
return YES;
}
- (BOOL)isInlineTextView:(UIView *)view {
return [view isKindOfClass:[SFGInlineTextView class]];
}
显然有检查禁止长按。为了保留以前的实现,我已经检查了手势是否不是所需的textView
。