The timing information for animations that mimics the behavior of a spring.
- iOS 10.0+
- tvOS 10.0+
The timing provided by a
UISpring object mimics the behavior of a spring acting on the value of the property being animated. This property’s value accelerates toward its final value according to the relative force of the spring, which you configure. It then oscillates around that final value until it comes to a rest. The speed at which a property animates to its new value is based on the initial velocity of the value and the damping ratio applied to the spring. You can specify those values directly or using analogous spring-related values.
Use instances of this class to specify custom timing curves when creating animations with objects that adopt the
UIView protocol, such as
UIView. Spring animations are commonly used to modify a view’s position onscreen, but you can apply the timing to any of the view’s properties to get a similar type of animation timing.