我正在 ISGL3D 中开发一个应用程序。我一次只需要识别一个手势
即PICNH或PAN ..
有没有办法做到这一点?
您必须实现该UIGestureRecognizerDelegate
方法gestureRecognizer:shouldRecognizeSimultaneouslyWithGestureRecognizer:
和return NO
您可以使用此功能一次仅识别一个手势:
- (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldRecognizeSimultaneouslyWithGestureRecognizer:(UIGestureRecognizer *)otherGestureRecognizer
{
if (gestureRecognizer.view != otherGestureRecognizer.view)
return NO;
return YES;
}