Protocol

Animatable

A type for animating views.

Declaration

protocol Animatable

Topics

Associated Types

associatedtype AnimatableData

The type defining the data to animate.

Required.

Instance Properties

var animatableData: Self.AnimatableData

The data to animate.

Required. Default implementations provided.

See Also

Animation

Animating Views and Transitions

When using SwiftUI, you can individually animate changes to views, or to a view’s state, no matter where the effects are. SwiftUI handles all the complexity of these combined, overlapping, and interruptible animations for you.

protocol AnimatableModifier

A modifier that can create another modifier with animation.

func withAnimation<Result>(Animation?, () -> Result) -> Result

Returns the result of recomputing the view’s body with the provided animation.

struct AnimatablePair

A pair of animatable values, which is itself animatable.

struct EmptyAnimatableData

An empty type for animatable data.

struct AnyTransition

A type-erased transition.