4

我正在 ISGL3D 中开发一个应用程序。我一次只需要识别一个手势

即PICNH或PAN ..

有没有办法做到这一点?

4

2 回答 2

7

您必须实现该UIGestureRecognizerDelegate方法gestureRecognizer:shouldRecognizeSimultaneouslyWithGestureRecognizer:return NO

于 2012-12-17T07:38:22.000 回答
5

您可以使用此功能一次仅识别一个手势:

- (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldRecognizeSimultaneouslyWithGestureRecognizer:(UIGestureRecognizer *)otherGestureRecognizer
{
    if (gestureRecognizer.view != otherGestureRecognizer.view)
        return NO;

    return YES;
}
于 2012-12-17T07:31:07.507 回答