在ISGL3D中,我们一次只能识别一个手势吗?

时间:2012-12-17 07:28:13

标签: iphone ios uigesturerecognizer isgl3d

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

即。 PICNH或PAN ..

有没有办法做到这一点??

2 个答案:

答案 0 :(得分:7)

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

答案 1 :(得分:5)

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

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

    return YES;
}