Initializes the object with the specified spring stiffness, mass, and damping coefficients.
- iOS 10.0+
- Mac Catalyst 13.0+
- tvOS 10.0+
The effective mass of the animated property. This value must be greater than
The spring stiffness coefficient. Higher values correspond to a stiffer spring that yields a greater amount of force for moving objects.
The damping force to apply to the spring’s motion. This value is used to compute the damping ratio.
The initial velocity and direction of the animation, specified as a unit vector. When applying a spring animation to an existing animation, use this parameter to create a smoother transition between the animations. This parameter is specified as a two-dimensional vector to accommodate view movements. For properties that don’t involve two-dimensional motion, only the magnitude of the vector is considered.
A vector with a magnitude of
1corresponds to an initial velocity that would cover the total animation distance in one second. For example, if the total animation distance is 200 points and the view’s initial velocity is 100 points per second, specify a vector with a magnitude of
An initialized spring timing parameters object or
nil if the object could not be created.
The damping ratio for the spring is computed from the formula
damping / (2 * sqrt (