Instance Property

initialVelocity

The initial velocity to apply to the animation.

Declaration

var initialVelocity: CGVector { get }

Discussion

The initial velocity and direction of the animation, specified as a unit vector. For most animatable properties, only the magnitude of this vector is used. For properties that affect the position of the view, both the direction and magnitude are taken into account. A vector with a magnitude of 1.0 corresponds to an initial velocity that would cover the total animation distance in one second. For example, if a view is to be moved 200 points and the view’s initial velocity is 100 points per second, the initial velocity should be set to 0.5.