Mac Developer Library

Developer

QuartzCore Framework Reference CAReplicatorLayer Class Reference

Options
Deployment Target:

On This Page
Language:

CAReplicatorLayer

The CAReplicatorLayer class creates a specified number of copies of its sublayers (the source layer), each copy potentially having geometric, temporal and color transformations applied to it.

Inheritance


Import Statement


Swift

import QuartzCore

Objective-C

@import QuartzCore;

Availability


Available in OS X v10.6 and later.
  • The number of copies to create, including the source layers.

    Declaration

    Swift

    var instanceCount: Int

    Objective-C

    @property NSInteger instanceCount

    Discussion

    Default value is 1, no extra copies are created.

    Import Statement

    Objective-C

    @import QuartzCore;

    Swift

    import QuartzCore

    Availability

    Available in OS X v10.6 and later.

  • Specifies the delay, in seconds, between replicated copies. Animatable.

    Declaration

    Swift

    var instanceDelay: CFTimeInterval

    Objective-C

    @property CFTimeInterval instanceDelay

    Discussion

    Default is 0.0.

    Import Statement

    Objective-C

    @import QuartzCore;

    Swift

    import QuartzCore

    Availability

    Available in OS X v10.6 and later.

  • The transform matrix applied to the previous instance to produce the current instance. Animatable.

    Declaration

    Swift

    var instanceTransform: CATransform3D

    Objective-C

    @property CATransform3D instanceTransform

    Discussion

    This transform matrix is applied to instance k-1 to produce instance k. The matrix is applied relative to the center of this layer.

    Defaults to the identity matrix.

    Import Statement

    Objective-C

    @import QuartzCore;

    Swift

    import QuartzCore

    Availability

    Available in OS X v10.6 and later.

  • Defines whether this layer flattens its sublayers into its plane.

    Declaration

    Swift

    var preservesDepth: Bool

    Objective-C

    @property BOOL preservesDepth

    Discussion

    If YEStrue, the layer acts similarly to the CATransformLayer and has the same restrictions.

    Default is NOfalse.

    Import Statement

    Objective-C

    @import QuartzCore;

    Swift

    import QuartzCore

    Availability

    Available in OS X v10.6 and later.

  • Defines the color used to multiply the source object. Animatable.

    Declaration

    Swift

    var instanceColor: CGColor!

    Objective-C

    @property CGColorRef instanceColor

    Discussion

    Defaults to opaque white.

    Import Statement

    Objective-C

    @import QuartzCore;

    Swift

    import QuartzCore

    Availability

    Available in OS X v10.6 and later.

  • Defines the offset added to the red component of the color for each replicated instance. Animatable.

    Declaration

    Swift

    var instanceRedOffset: Float

    Objective-C

    @property float instanceRedOffset

    Discussion

    The instanceRedOffset is added to the red color component of instance k-1 to produce the modulation color of instance k.

    Default is 0.0.

    Import Statement

    Objective-C

    @import QuartzCore;

    Swift

    import QuartzCore

    Availability

    Available in OS X v10.6 and later.

  • Defines the offset added to the green component of the color for each replicated instance. Animatable.

    Declaration

    Swift

    var instanceGreenOffset: Float

    Objective-C

    @property float instanceGreenOffset

    Discussion

    The instanceGreenOffset is added to the green color component of instance k-1 to produce the modulation color of instance k.

    Default is 0.0.

    Import Statement

    Objective-C

    @import QuartzCore;

    Swift

    import QuartzCore

    Availability

    Available in OS X v10.6 and later.

  • Defines the offset added to the blue component of the color for each replicated instance. Animatable.

    Declaration

    Swift

    var instanceBlueOffset: Float

    Objective-C

    @property float instanceBlueOffset

    Discussion

    The instanceBlueOffset is added to the blue color component of instance k-1 to produce the modulation color of instance k.

    Default is 0.0.

    Import Statement

    Objective-C

    @import QuartzCore;

    Swift

    import QuartzCore

    Availability

    Available in OS X v10.6 and later.

  • Defines the offset added to the alpha component of the color for each replicated instance. Animatable.

    Declaration

    Swift

    var instanceAlphaOffset: Float

    Objective-C

    @property float instanceAlphaOffset

    Discussion

    The instanceAlphaOffset is added to the alpha color component of instance k-1 to produce the modulation color of instance k.

    Default is 0.0.

    Import Statement

    Objective-C

    @import QuartzCore;

    Swift

    import QuartzCore

    Availability

    Available in OS X v10.6 and later.