如果某个view的gesture 被其他view 劫持怎么办?
设置gesture的delegate,并实现delegate的以下方法
- (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldReceiveTouch:(UITouch *)touch;
或者重写view的如下方法:
- (BOOL)gestureRecognizerShouldBegin:(UIGestureRecognizer *)gestureRecognizer
(touch event 应该是依据response chain 传递的)
时间: 2024-10-13 04:55:55