UIPanGestureRecognizer

extension UIPanGestureRecognizer
  • A convenience initializer for a UIPanGestureRecognizer so that it can be configured with a single line of code.

    Declaration

    Swift

    public convenience init(minTouches: Int = 1,
                            maxTouches: Int = .max,
                            handler: @escaping (_ gesture: UIPanGestureRecognizer) -> Void)

    Parameters

    minTouches

    Defaults UIPanGestureRecognizer’s minimumNumberOfTouches property value

    maxTouches

    Defaults UIPanGestureRecognizer’s maximumNumberOfTouches property value

    handler

    The closure that is called when the gesture is recognized