Q:

SwiftUI Animation.fluidSpring() replacement

I'm using Xcode Beta 7, and following a tutorial where they use Animation.fluidSpring(). I couldn't find a .fluidSpring() anywhere in the autocomplete. Did they replace it? If so, what is the replacement?

A:

From the macOS 10.15 Beta release notes:

Updated the APIs for creating animations. The basic animations are now named after the curve type — such as linear and easeInOut. The interpolation-based spring(mass:stiffness:damping:initialVelocity:) animation is now interpolatingSpring(mass:stiffness:damping:initialVelocity:) , and fluidSpring(stiffness:dampingFraction:blendDuration:timestep:idleThreshold:) is now spring(response:dampingFraction:blendDuration:) or interactiveSpring(response:dampingFraction:blendDuration:) , depending on whether or not the animation is driven interactively. (50280375)

So either spring or interactiveSpring.

