When using SwiftUI, it’s important to animate views and transitions with silky smooth performance. This article introduces the two protocols for SwiftUI animation that every developer must know.
Photo by Simon Berger on Unsplash
The Animatable
protocol is available on iOS 13+. It defines the type that can be animated. The only value the protocol contains is animatableData
which is the associated type of VectorArithmetic
. VectorArithmetic
extends the AdditiveArithmetic
protocol with scalar multiplication and a way to query the vector magnitude of the valu
#programming #swift #ios #swiftui #mobile