Generic Instance Method

animation(_:value:)

Applies the given animation to this view, whenever the specified value changes.

Declaration

func animation<V>(_ animation: Animation?, value: V) -> some View where V : Equatable

Parameters

animation

The animation to apply. If animation is nil, the view doesn’t animate.

value

A value to monitor for changes.

Return Value

A view that applies animation to this view whenever value changes.

See Also

Adding Animations to a View

func animation(Animation?) -> View

Applies the given animation to all animatable values within this view.

Beta
func transition(AnyTransition) -> View

Associates a transition with self.

Beta

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software