Small panGesture 正在作为singleTap 手势,为什么? iOS

Small panGesture is taking as singleTap gesture, why? iOS

我已经在我的应用程序中实现了所有手势,并在 shouldRecognizeSimultaneouslyWithGestureRecognizer 中返回“是”。 我面临的问题是当我平移一点时,它认为它是 singleTap 并且 singleTap 的代码正在执行。我能理解,我必须在 shouldRecognizeSimultaneouslyWithGestureRecognizer 中执行条件代码,但是我得到的两个手势是 rotationGesturepanGesture? 我是 stuck.Any 帮助将不胜感激。

对于录音,缩放有多个第三方视图可用,您可以使用它们,因为它们已经过测试。对于我的大多数应用程序,我更喜欢 ZDStickerView link

我自己解决了,

对于面临这种困难的其他人,

- (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldRecognizeSimultaneouslyWithGestureRecognizer:(UIGestureRecognizer *)otherGestureRecognizer {
if ([otherGestureRecognizer isKindOfClass:[singleTapGesture class]] || [otherGestureRecognizer isKindOfClass:[panGesture class]]) {
    return NO;
} else {
    return YES;
    }
}