Mac Developer Library

Developer

QuartzCore Framework Reference CAPropertyAnimation Class Reference

Options
Deployment Target:

On This Page
Language:

CAPropertyAnimation

CAPropertyAnimation is an abstract subclass of CAAnimation for creating animations that manipulate the value of layer properties. The property is specified using a key path that is relative to the layer using the animation.

Import Statement


Swift

import QuartzCore

Objective-C

@import QuartzCore;

Availability


Available in OS X v10.5 and later.
  • keyPath keyPath Property

    Specifies the key path the receiver animates.

    Declaration

    Swift

    var keyPath: String!

    Objective-C

    @property(copy) NSString *keyPath

    Discussion

    The key path is relative to the layer the receiver is attached to.

    Import Statement

    Objective-C

    @import QuartzCore;

    Swift

    import QuartzCore

    Availability

    Available in OS X v10.5 and later.

  • Determines if the value of the property is the value at the end of the previous repeat cycle, plus the value of the current repeat cycle.

    Declaration

    Swift

    var cumulative: Bool

    Objective-C

    @property(getter=isCumulative) BOOL cumulative

    Discussion

    If YEStrue, then the value of the property is the value at the end of the previous repeat cycle, plus the value of the current repeat cycle. If NOfalse, the value of the property is simply the value calculated for the current repeat cycle. The default is NOfalse.

    Import Statement

    Objective-C

    @import QuartzCore;

    Swift

    import QuartzCore

    Availability

    Available in OS X v10.5 and later.

  • additive additive Property

    Determines if the value specified by the animation is added to the current render tree value to produce the new render tree value.

    Declaration

    Swift

    var additive: Bool

    Objective-C

    @property(getter=isAdditive) BOOL additive

    Discussion

    If YEStrue, the value specified by the animation will be added to the current render tree value of the property to produce the new render tree value. The addition function is type-dependent, e.g. for affine transforms the two matrices are concatenated. The default is NOfalse.

    Import Statement

    Objective-C

    @import QuartzCore;

    Swift

    import QuartzCore

    Availability

    Available in OS X v10.5 and later.

  • An optional value function that is applied to interpolated values.

    Declaration

    Swift

    var valueFunction: CAValueFunction!

    Objective-C

    @property(strong) CAValueFunction *valueFunction

    Discussion

    If the valueFunction property is not nil, the function is applied to the values interpolated by the animation as they are applied to the presentation layer. Defaults to nil.

    Import Statement

    Objective-C

    @import QuartzCore;

    Swift

    import QuartzCore

    Availability

    Available in OS X v10.6 and later.

  • Creates and returns an CAPropertyAnimation instance for the specified key path.

    Declaration

    Swift

    convenience init!(keyPath keyPath: String!)

    Objective-C

    + (instancetype)animationWithKeyPath:(NSString *)keyPath

    Parameters

    keyPath

    The key path of the property to be animated.

    Return Value

    A new instance of CAPropertyAnimation with the key path set to keyPath.

    Import Statement

    Objective-C

    @import QuartzCore;

    Swift

    import QuartzCore

    Availability

    Available in OS X v10.5 and later.