如何截取兄弟视图的手势?

时间:2013-03-27 08:44:10

标签: ios uigesturerecognizer

如果有三种观点:

view1
    ---subview1
    ---subview2

通常,subview2会处理每个手势,但是,在我的情况下,我只需要subview2来处理捏手势,其他手势如pan和rotate将传递给subview1,有什么方法可以做到吗?

1 个答案:

答案 0 :(得分:0)

UIGestureRecognizerDelegate-Protocol

实施此方法
- (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldRecognizeSimultaneouslyWithGestureRecognizer:(UIGestureRecognizer *)otherGestureRecognizer {
    return true;
}