Contents

easeOut

An animation that starts quickly and then slows towards the end of the movement.

Declaration

static var easeOut: Animation { get }

Return Value

An ease-out animation with the default duration.

Discussion

An easing animation provides motion with a natural feel by varying the acceleration and deceleration of the animation, which matches how things tend to move in reality. With an ease out animation, the motion starts quickly and decreases its speed towards the end.

The easeOut animation has a default duration of 0.35 seconds. To specify a different duration, use easeOut(duration:).

The following code shows an example of animating the size changes of a Circle using an ease out animation.

struct ContentView: View {
    @State private var scale = 0.5

    var body: some View {
        VStack {
            Circle()
                .scale(scale)
                .animation(.easeOut, value: scale)
            HStack {
                Button("+") { scale += 0.1 }
                Button("-") { scale -= 0.1 }
            }
        }
    }
}

See Also

Getting eased animations