Pan和2 Finger Pinch同步iOS – 同时 –

2手势识别器:
UIPinchGestureRecognizer *twoFingerPinch = 
[[UIPinchGestureRecognizer alloc] initWithTarget:self action:@selector(handlePinch:)];
[croppper addGestureRecognizer:twoFingerPinch];

UIPanGestureRecognizer *PanRecognizer = [[[UIPanGestureRecognizer alloc] initWithTarget:self action:@selector(handlePan:)] autorelease];
[croppper addGestureRecognizer:PanRecognizer];

和:

- (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldRecognizeSimultaneouslyWithGestureRecognizer:(UIGestureRecognizer *)otherGestureRecognizer {        
    return YES;
}

但同时捏和平底锅不起作用……
通常我可以捏,因为锅识别器已打开.

问候

解决方法

它看起来不像是为每个手势识别器设置委托. gestureRecognizer:shouldRecognizeSimultaneouslyWithGestureRecognizer:是一个委托方法,因此如果手势识别器没有委托,则不会调用方法.

因此,认返回值将为NO,因此不会同时识别手势.

相关文章

当我们远离最新的 iOS 16 更新版本时,我们听到了困扰 Apple...
欧版/美版 特别说一下,美版选错了 可能会永久丧失4G,不过只...
一般在接外包的时候, 通常第三方需要安装你的app进行测...
前言为了让更多的人永远记住12月13日,各大厂都在这一天将应...