Generic Structure

GestureState

A dynamic view property that stores state during performance of a gesture.

Declaration

@propertyWrapper @frozen struct GestureState<Value>

Overview

A GestureState updates its data as the gesture changes, and implicitly resets when the gesture becomes inactive.

Topics

Initializers

init(initialValue: Value)

Creates a gesture state with the initial state value.

init(initialValue: Value, resetTransaction: Transaction)

Creates a gesture state with the initial state value and a reset transaction.

init(reset: (Value, inout Transaction) -> Void)
init(resetTransaction: Transaction)

Creates a gesture state with a reset transaction.

Instance Methods

func update()

Updates the value of the property prior to populating the view.

Relationships

Conforms To

See Also

Dynamic View Properties