Mac Developer Library

Developer

Quartz Framework Reference QCCompositionLayer Class Reference

Options
Deployment Target:

On This Page
Language:

QCCompositionLayer

The QCCompositionLayer class loads, plays, and controls Quartz Composer compositions in a Core Animation layer hierarchy. The composition tracks the Core Animation layer time and is rendered directly at the current dimensions of the QCCompositionLayer object. More...

Inheritance


Import Statement


import Quartz @import Quartz;

Availability


Available in OS X v10.5 and later.
  • Creates and returns an instance of a composition layer using the Quartz Composer composition in the specified file.

    Declaration

    Objective-C

    + (QCCompositionLayer *)compositionLayerWithFile:(NSString *)path

    Parameters

    path

    A string that specifies the location of a Quartz Composer composition.

    Return Value

    An initialized QCCompositionLayer object or nil if initialization is not successful.

    Import Statement

    Availability

    Available in OS X v10.5 and later.

  • Creates and returns an instance of a composition layer using the provided Quartz Composer composition.

    Declaration

    Objective-C

    + (QCCompositionLayer *)compositionLayerWithComposition:(QCComposition *)composition

    Parameters

    composition

    The Quartz Composer composition to use as content.

    Return Value

    An initialized QCCompositionLayer object or nil if initialization is not successful.

    Import Statement

    Availability

    Available in OS X v10.5 and later.

  • Initializes and returns a composition layer using the Quartz Composer composition in the specified file.

    Declaration

    Swift

    init!(file path: String!)

    Objective-C

    - (id)initWithFile:(NSString *)path

    Parameters

    path

    A string that specifies the location of a Quartz Composer composition.

    Return Value

    The initialized QCCompositionLayer object or nil if initialization is not successful.

    Import Statement

    import Quartz

    Availability

    Available in OS X v10.5 and later.

  • Initializes and returns a composition layer using the provided Quartz Composer composition.

    Declaration

    Swift

    init!(composition composition: QCComposition!)

    Objective-C

    - (id)initWithComposition:(QCComposition *)composition

    Parameters

    composition

    The Quartz Composer composition to use as content.

    Return Value

    The initialized QCCompositionLayer object or nil if initialization is not successful.

    Import Statement

    import Quartz

    Availability

    Available in OS X v10.5 and later.

  • Returns the composition associated with the layer.

    Declaration

    Swift

    func composition() -> QCComposition!

    Objective-C

    - (QCComposition *)composition

    Return Value

    The composition object associated with the layer or nil if there is none.

    Import Statement

    import Quartz

    Availability

    Available in OS X v10.5 and later.