Class

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.

Overview

An archived QCCompositionLayer object saves the composition that’s loaded at the time the layer is archived. It detects layer usage and pauses or resumes the composition appropriately. A QCCompositionLayer object starts rendering the composition automatically when the layer is placed in a visible layer hierarchy. The layer stops rendering when it is hidden or removed from the visible layer hierarchy.

You can pass data to the input ports, or retrieve data from the output ports, of the root patch of a composition by accessing the patch attribute of the QCCompositionLayer instance using methods provided by the QCCompositionRenderer protocol.

Symbols

Creating the layer

init!(file: String!)

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

init!(composition: QCComposition!)

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

Getting the Composition

func composition()

Returns the composition associated with the layer.

Relationships

Inherits From