An object that provides a flexible method of defining animated transformations.
SDKs
- iOS 3.0+
- macOS 10.6+
- Mac Catalyst 13.0+
- tvOS 9.0+
Framework
- Core Animation
Declaration
@interface CAValueFunction : NSObject
Overview
You can use a value function to specify the individual components of an animated transform.
For example, to create a basic animation that rotates a layer from 0° to 180° around its z-axis, you would create a CABasic
object with a from
of 0
, a to
of pi
, and a value
of a CAValue
with a function name of k
.
The value functions k
and k
require 3 values, for the individual x
, y
and z
components. When working with these value functions, you specify the animation's from
and to
as arrays.