Structure

DragGesture.Value

The attributes of a drag gesture.

Declaration

struct DragGesture.Value

Topics

State

var location: CGPoint

The location of the drag gesture’s current event.

var predictedEndLocation: CGPoint

A prediction, based on the current drag velocity, of where the final location will be if dragging stopped now.

var predictedEndTranslation: CGSize

A prediction, based on the current drag velocity, of what the final translation will be if dragging stopped now.

var startLocation: CGPoint

The location of the drag gesture’s first event.

var time: Date

The time associated with the drag gesture’s current event.

var translation: CGSize

The total translation from the start of the drag gesture to the current event of the drag gesture.

Operator Functions

static func != (DragGesture.Value, DragGesture.Value) -> Bool

Returns a Boolean value indicating whether two values are not equal.

static func == (DragGesture.Value, DragGesture.Value) -> Bool

Returns a Boolean value indicating whether two values are equal.

Relationships

From Protocol

See Also

Performing the Gesture

func onChanged((Value) -> Void) -> _ChangedGesture<DragGesture>

Adds an action to perform when the gesture’s value changes.

func onEnded((Value) -> Void) -> _EndedGesture<DragGesture>

Adds an action to perform when the gesture ends.