Xcode beta 4 deprecates all the static Animation types (e.g., basic, spring, and fluidSpring). However, I cannot determine what replaces them. Anyone have any luck figuring this out?
- Updated the APIs for creating animations. The
basic
animations are now named after the curve type — such aslinear
andeaseInOut
. The interpolation-basedspring(mass:stiffness:damping:initialVelocity:)
animation is nowinterpolatingSpring(mass:stiffness:damping:initialVelocity:)
, andfluidSpring(stiffness:dampingFraction:blendDuration:timestep:idleThreshold:)
is nowspring(response:dampingFraction:blendDuration:)
orinteractiveSpring(response:dampingFraction:blendDuration:)
, depending on whether or not the animation is driven interactively. (50280375)
From the macOS 10.15 Beta 4 Changelog
Thank you.
I was looking in the Xcode release notes. I would not have thought to look at any of the OS release notes.
These new APIs do not show up in the developer documentation that comes with Xcode. However, I just looked and they do appear in the online documentation.
For fluidSpring -
.animation(.interactiveSpring(response: 0.5, dampingFraction: 1, blendDuration: 1))
Change values based on your requirements.