Initializer

init(initialValue:reset:)

Creates a view state that’s derived from a gesture with an initial state value and a closure that provides a transaction to reset it.

Declaration

init(initialValue: Value, reset: @escaping (Value, inout Transaction) -> Void)

Parameters

initialValue

An initial state value.

reset

A closure that provides a Transaction.

See Also

Creating a Gesture State

init(initialValue: Value)

Creates a view state that’s derived from a gesture with an initial value.

init(initialValue: Value, resetTransaction: Transaction)

Creates a view state that’s derived from a gesture with an initial state value and a transaction to reset it.

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

Creates a view state that’s derived from a gesture with a closure that provides a transaction to reset it.

init(resetTransaction: Transaction)

Creates a view state that’s derived from a gesture with a transaction to reset it.

init(wrappedValue: Value)

Creates a view state that’s derived from a gesture.

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

Creates a view state that’s derived from a gesture with a wrapped state value and a closure that provides a transaction to reset it.

init(wrappedValue: Value, resetTransaction: Transaction)

Creates a view state that’s derived from a gesture with a wrapped state value and a transaction to reset it.

var wrappedValue: Value

The wrapped value referenced by the gesture state property.

var projectedValue: GestureState<Value>

A binding to the gesture state property.