添加手势的代理
1 | <UIGestureRecognizerDelegate> |
在代理方法中判断手势的的 VIew
是不是 UIButton
如果是 UIButton
就不响应
1 | - (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldReceiveTouch:(UITouch *)touch |
或者判断点击的位置
1 | - (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldReceiveTouch:(UITouch *)touch |