withState(_:)
Creates a new context from another one with a state that you provide.
Declaration
func withState<T>(_ state: AnimationState<T>) -> AnimationContext<T> where T : VectorArithmeticParameters
- state:
The initial state for the new context.
Return Value
A new context that contains the specified state.
Discussion
Use this method to create a new context that contains the state that you provide and view environment values from the original context.