Contents

init(minimumDuration:maximumDistance:inputKinds:)

Creates a long-press gesture with a minimum duration, a maximum distance, and the input kinds the gesture recognizes.

Declaration

nonisolated init(minimumDuration: Double = 0.5, maximumDistance: CGFloat = 10, inputKinds: GestureInputKinds = .all)

Parameters

  • minimumDuration:

    The minimum duration of the long press that must elapse before the gesture succeeds.

  • maximumDistance:

    The maximum distance that the fingers or cursor performing the long press can move before the gesture fails.

  • inputKinds:

    A set of input kinds that this gesture recognizes. If not specified, the gesture will recognize all applicable input kinds that a person can use to perform it.

See Also

Creating a long press gesture