---
title: QCCompositionLayer
framework: quartz
role: symbol
role_heading: Class
path: quartz/qccompositionlayer
---

# QCCompositionLayer

A layer that loads, plays, and controls Quartz Composer compositions in a Core Animation layer hierarchy.

## Declaration

```swift
class QCCompositionLayer
```

## Overview

Overview The composition tracks the Core Animation layer time and is rendered directly at the current dimensions of the QCCompositionLayer object. 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. note: You must not modify the asynchronous property of the superclass CAOpenGLLayer.

## Topics

### Creating a Composition Layer

- [init(file:)](quartz/qccompositionlayer/init(file:).md)
- [init(composition:)](quartz/qccompositionlayer/init(composition:).md)

### Getting the Composition

- [composition()](quartz/qccompositionlayer/composition().md)

## Relationships

### Inherits From

- [CAOpenGLLayer](quartzcore/caopengllayer.md)

### Conforms To

- [CAMediaTiming](quartzcore/camediatiming.md)
- [CVarArg](swift/cvararg.md)
- [CustomDebugStringConvertible](swift/customdebugstringconvertible.md)
- [CustomStringConvertible](swift/customstringconvertible.md)
- [Equatable](swift/equatable.md)
- [Hashable](swift/hashable.md)
- [NSCoding](foundation/nscoding.md)
- [NSObjectProtocol](objectivec/nsobjectprotocol.md)
- [NSSecureCoding](foundation/nssecurecoding.md)
- [QCCompositionRenderer](quartz/qccompositionrenderer.md)
- [Sendable](swift/sendable.md)
- [SendableMetatype](swift/sendablemetatype.md)

## See Also

### Classes

- [QCComposition](quartz/qccomposition.md)
- [QCCompositionParameterView](quartz/qccompositionparameterview.md)
- [QCCompositionPickerPanel](quartz/qccompositionpickerpanel.md)
- [QCCompositionPickerView](quartz/qccompositionpickerview.md)
- [QCCompositionRepository](quartz/qccompositionrepository.md)
- [QCPatchController](quartz/qcpatchcontroller.md)
- [QCPlugIn](quartz/qcplugin.md)
- [QCPlugInViewController](quartz/qcpluginviewcontroller.md)
- [QCRenderer](quartz/qcrenderer.md)
- [QCView](quartz/qcview.md)
