我正在开发ISGL3D中的应用程序。我需要一次只识别一个手势
即。 PICNH或PAN ..
有没有办法做到这一点??
答案 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;
}