专案上遇到手势冲突问题,
如果是用code宣告swipe与pan手势,
UISwipeGestureReognizer *swipe = [..]以及
UIPanGestureRecRecognizer *pan = [..];
可用[pan requireGestureRecognizerToFail:swipe]解决,
但今天我用了storyboard拖曳swipe与pan进View,
并写了两个function如下,
-(IBAction)swipe:(UISwipeGestureRecognizer *)sender{
// do something;
}
-(IBAction)pan:(UIPanGestureRecognizer *)snder{
// do something;
}
我的requireGestureRecognizerToFail要如何写
与写在哪里才能解决手势冲突的问题呢?
还烦请版上前辈多多指教 谢谢