The timing information for animations that mimics the behavior of a spring.


@interface UISpringTimingParameters : NSObject


The timing provided by a UISpringTimingParameters 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 UIViewAnimating protocol, such as UIViewPropertyAnimator. 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.


Initializing a Spring Timing Parameters Object

- init

Initializes the object with the default timing parameters.

- initWithDampingRatio:

Initializes the timing parameters with the specified damping ratio.

- initWithDampingRatio:initialVelocity:

Initializes the object with the specified damping ratio and velocity vector.

- initWithMass:stiffness:damping:initialVelocity:

Initializes the object with the specified spring stiffness, mass, and damping coefficients.

Getting the Initial Velocity


The initial velocity to apply to the animation.


Inherits From

See Also

Timing Curves


An interface for providing the timing information needed to perform animations.


The timing information for animations in the form of a cubic Bézier curve.