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];
上一篇 下一篇

猜你喜欢

热点阅读