iOS Developer Library

Developer

QuartzCore Framework Reference CAValueFunction Class Reference

Options
Deployment Target:

On This Page
Language:

CAValueFunction

The CAValueFunction.h class provides a more flexible means of applying functions to property values during animation. A value function defines an optional transformation that is applied to the interpolated value before it is set in the presentation layer. More...

Inheritance


Conforms To


Import Statement


import QuartzCore @import QuartzCore;

Availability


Available in iOS 3.0 and later.
  • name name Property

    Returns the name of the value function. (read-only)

    Declaration

    Swift

    var name: String! { get }

    Objective-C

    @property(readonly) NSString *name

    Import Statement

    import QuartzCore

    Availability

    Available in iOS 3.0 and later.

  • Returns the value function object identified by the name.

    Declaration

    Swift

    convenience init!(name name: String!)

    Objective-C

    + (instancetype)functionWithName:(NSString *)name

    Parameters

    name

    The name of the value function.

    Return Value

    A new CAValueFunction instance with the value function specified by the name.

    Discussion

    The possible values for name are specified in Rotate Value Functions, Scale Value Functions, and Translate Functions.

    Import Statement

    import QuartzCore

    Availability

    Available in iOS 3.0 and later.

  • Rotate value transform functions construct a 4x4 matrix that represents the corresponding rotation matrix.

    Declaration

    Swift

    let kCAValueFunctionRotateX: NSString! let kCAValueFunctionRotateY: NSString! let kCAValueFunctionRotateZ: NSString!

    Objective-C

    NSString * const kCAValueFunctionRotateX; NSString * const kCAValueFunctionRotateY; NSString * const kCAValueFunctionRotateZ;

    Constants

    • kCAValueFunctionRotateX

      kCAValueFunctionRotateX

      A value function that rotates by the input value, in radians, around the x-axis. This value function expects a single input value.

      Available in iOS 3.0 and later.

    • kCAValueFunctionRotateY

      kCAValueFunctionRotateY

      A value function that rotates by the input value, in radians, around the y-axis. This value function expects a single input value.

      Available in iOS 3.0 and later.

    • kCAValueFunctionRotateZ

      kCAValueFunctionRotateZ

      A value function that rotates by the input value, in radians, around the z-axis. This value function expects a single input value.

      Available in iOS 3.0 and later.

    Import Statement

  • Scale value transform functions construct a 4x4 matrix that represents the corresponding scale matrix.

    Declaration

    Swift

    let kCAValueFunctionScale: NSString! let kCAValueFunctionScaleX: NSString! let kCAValueFunctionScaleY: NSString! let kCAValueFunctionScaleZ: NSString!

    Objective-C

    NSString * const kCAValueFunctionScale; NSString * const kCAValueFunctionScaleX; NSString * const kCAValueFunctionScaleY; NSString * const kCAValueFunctionScaleZ;

    Constants

    • kCAValueFunctionScale

      kCAValueFunctionScale

      A value function scales by the input value along all three axis. Animations using this value transform function must provide animation values in an NSArray of three NSNumber instances that specify the (x, y, z) scale values.

      Available in iOS 3.0 and later.

    • kCAValueFunctionScaleX

      kCAValueFunctionScaleX

      A value function scales by the input value along the x-axis. Animations referencing this value transform function must provide a single animation value.

      Available in iOS 3.0 and later.

    • kCAValueFunctionScaleY

      kCAValueFunctionScaleY

      A value function scales by the input value along the y-axis. Animations referencing this value function must provide a single animation value.

      Available in iOS 3.0 and later.

    • kCAValueFunctionScaleZ

      kCAValueFunctionScaleZ

      A value function that scales by the input value along the z-axis. Animations referencing this value function must provide a single animation value.

      Available in iOS 3.0 and later.

    Import Statement

  • Translate value transform functions construct a 4x4 matrix that represents the corresponding translate matrix.

    Declaration

    Swift

    let kCAValueFunctionTranslate: NSString! let kCAValueFunctionTranslateX: NSString! let kCAValueFunctionTranslateY: NSString! let kCAValueFunctionTranslateZ: NSString!

    Objective-C

    NSString * const kCAValueFunctionTranslate; NSString * const kCAValueFunctionTranslateX; NSString * const kCAValueFunctionTranslateY; NSString * const kCAValueFunctionTranslateZ;

    Constants

    • kCAValueFunctionTranslate

      kCAValueFunctionTranslate

      A value function that translates by the input values along all three axis. Animations using this value transform function must provide animation values in an NSArray of three NSNumber instances that specify the (x, y, z) translate values.

      Available in iOS 3.0 and later.

    • kCAValueFunctionTranslateX

      kCAValueFunctionTranslateX

      A value function translates by the input value along the x-axis. Animations referencing this value function must provide a single input value.

      Available in iOS 3.0 and later.

    • kCAValueFunctionTranslateY

      kCAValueFunctionTranslateY

      A value function translates by the input value along the y-axis. Animations referencing this value function must provide a single input value.

      Available in iOS 3.0 and later.

    • kCAValueFunctionTranslateZ

      kCAValueFunctionTranslateZ

      A value function translates by the input value along the z-axis. Animations referencing this value function must provide a single input value.

      Available in iOS 3.0 and later.

    Import Statement