Initializes the object with the specified damping ratio and velocity vector.
- iOS 10.0+
- Mac Catalyst 13.0+
- tvOS 10.0+
The damping ratio to apply to the spring’s motion. To smoothly decelerate the animation without oscillation, specify a value of
1. Specify values closer to
0to create less damping and more oscillation.
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.
This method sets the initial velocity and damping ratio to the provided values.