CAKeyframeAnimation: continuityValues property
The continuityValues property adjusts the continuity of the smooth curve near each keyframe value. Only takes effect when calculationMode is 'cubic' or 'cubicPaced'.
Value
An array of numbers, or null. Each item corresponds to one value in values, ranges from −1 to 1, and has no unit.
- Readable and writable.
- The default is
null. Items not given count as 0. - The effect is not verified in the simulator.
Invalid values
Throws TypeError:
- Neither an array nor
null:continuityValues must be an array of numbers or null, got … - An item cannot be converted to a finite number:
continuityValues[0] must be a finite number, got …
Examples
js
const wave = CAKeyframeAnimation.animationWithKeyPath('position');
wave.values = [new CGPoint(30, 80), new CGPoint(150, 20), new CGPoint(270, 80)];
wave.calculationMode = 'cubic';
wave.continuityValues = [0, 0.5, 0];
console.log((wave.continuityValues || []).join(','));Result: The console prints 0,0.5,0. The continuity of the curve near the middle value changes. How it looks on screen is not verified in the simulator.
Corresponding iOS API
CAKeyframeAnimation.continuityValues.