UIPanGestureRecognizer 和 UISwipe
2020-02-25 本文已影响0人
manmangood
- (UIPanGestureRecognizer *)panGesture{
if (!_panGesture) {
_panGesture = [[UIPanGestureRecognizer alloc] init];
}
return _panGesture;
}
- (UISwipeGestureRecognizer *)swipeGestureLeft{
if (!_swipeGestureLeft) {
_swipeGestureLeft = [[UISwipeGestureRecognizer alloc] init];
_swipeGestureLeft.direction = UISwipeGestureRecognizerDirectionLeft;
}
return _swipeGestureLeft;
}
[self.panGesture requireGestureRecognizerToFail:self.swipeGestureLeft];