An optional array of NSNumber
objects that define the time at which to apply a given keyframe segment.
SDKs
- iOS 2.0+
- macOS 10.5+
- Mac Catalyst 13.0+
- tvOS 9.0+
Framework
- Core Animation
Declaration
Discussion
Each value in the array is a floating point number between 0
and 1
that defines the time point (specified as a fraction of the animation’s total duration) at which to apply the corresponding keyframe value. Each successive value in the array must be greater than, or equal to, the previous value. Usually, the number of elements in the array should match the number of elements in the values
property or the number of control points in the path
property. If they do not, the timing of your animation might not be what you expect.
The appropriate values to include in the array are dependent on the calculation
property.
If the
calculation
is set toMode k
orCAAnimation Linear k
, the first value in the array must beCAAnimation Cubic 0
and the last value must be.0 1
. All intermediate values represent time points between the start and end times..0 If the
calculation
is set toMode k
, the first value in the array must beCAAnimation Discrete 0
and the last value must be.0 1
. The array should have one more entry than appears in the values array. For example, if there are two values, there should be three key times..0 If the
calculation
is set toMode k
orCAAnimation Paced k
, the values in this property are ignored.CAAnimation Cubic Paced
If the values in this array are invalid or inappropriate for the current calculation mode, they are ignored.