FWPanGestureRecognizer


@interface FWPanGestureRecognizer : UIPanGestureRecognizer

FWPanGestureRecognizer

Note

自动处理与滚动视图pan手势在指定方向的冲突,默认设置delegate为自身。如果找到滚动视图则处理之,否则同父类
  • 是否自动检测滚动视图,默认YES。如需手工指定,请禁用之

    Declaration

    Objective-C

    @property (nonatomic) BOOL autoDetected;
  • 是否按下就立即转换Began状态,默认NO,需要等待移动才会触发Began

    Declaration

    Objective-C

    @property (nonatomic) BOOL instantBegan;
  • 指定滚动视图,自动处理与滚动视图pan手势在指定方向的冲突。自动设置默认delegate为自身

    Declaration

    Objective-C

    @property (nonatomic, weak, nullable) UIScrollView *scrollView;
  • 指定与滚动视图pan手势的冲突交互方向,默认向下

    Declaration

    Objective-C

    @property (nonatomic) UISwipeGestureRecognizerDirection direction;
  • 获取当前手势在指定交互方向的滑动进度

    Declaration

    Objective-C

    @property (nonatomic) CGFloat swipePercent;
  • 指定当前手势在指定交互方向的最大识别距离,默认0,无限制

    Declaration

    Objective-C

    @property (nonatomic) CGFloat maximumDistance;
  • 自定义Failed判断句柄。默认判定失败时直接修改状态为Failed,可设置此block修改判定条件

    Declaration

    Objective-C

    @property (nonatomic, copy, nullable) BOOL (^) (FWPanGestureRecognizer *_Nonnull __strong) shouldFailed;
  • 自定义shouldBegin判断句柄

    Declaration

    Objective-C

    @property (nonatomic, copy, nullable) BOOL (^) (FWPanGestureRecognizer *_Nonnull __strong) shouldBegin;
  • 自定义shouldBeRequiredToFail判断句柄

    Declaration

    Objective-C

    @property (nonatomic, copy, nullable) BOOL (^) (UIGestureRecognizer *_Nonnull __strong) shouldBeRequiredToFail;
  • 自定义shouldRequireFailure判断句柄

    Declaration

    Objective-C

    @property (nonatomic, copy, nullable) BOOL (^) (UIGestureRecognizer *_Nonnull __strong) shouldRequireFailure;