0

如果有三个视图:

视图1
    ---子视图1
    ---子视图2

通常,subview2 将处理每个手势,但是,就我而言,我只需要 subview2 来处理捏合手势,而其他手势(如平移和旋转)将传递给 subview1,有什么办法吗?

4

1 回答 1

0

UIGestureRecognizerDelegate-Protocol实现这个方法:

- (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldRecognizeSimultaneouslyWithGestureRecognizer:(UIGestureRecognizer *)otherGestureRecognizer {
    return true;
}
于 2013-03-27T08:51:49.930 回答