<!--
{
  "availability" : [
    "macOS: 10.4.0 - 10.15.0"
  ],
  "documentType" : "symbol",
  "framework" : "Quartz",
  "identifier" : "/documentation/Quartz/QCView",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "Quartz"
    ],
    "preciseIdentifier" : "c:objc(cs)QCView"
  },
  "title" : "QCView"
}
-->

# QCView

The `QCView` class is a custom `NSView` class that loads, plays, and controls Quartz Composer compositions. It is an autonomous view that is driven by an internal timer running on the main thread.

```
class QCView
```

## Overview

The view can be set to render a composition automatically when it is placed onscreen. The view stops rendering when it is placed offscreen. When not rendering, the view is filled with the current erase color. The rendered composition automatically synchronizes to the vertical retrace of the monitor.

When you archive a `QCView` object, it saves the composition that’s loaded at the time the view is archived.

If you want to perform custom operations while a composition is rendering such as setting input parameters or drawing OpenGL content, you need to subclass `QCView` and implement the [`render(atTime:arguments:)`](/documentation/Quartz/QCView/render(atTime:arguments:)) method.

## Topics

### Performing Custom Operations During Rendering

[`-  renderAtTime:arguments:`](/documentation/Quartz/QCView/render(atTime:arguments:))

Overrides to perform  your custom operations prior to or after rendering a frame of a composition.

### Loading a Composition

[`-  loadCompositionFromFile:`](/documentation/Quartz/QCView/loadComposition(fromFile:))

Loads the composition file located at the specified path.

[`-  loadComposition:`](/documentation/Quartz/QCView/load(_:))

Loads a [`QCComposition`](/documentation/Quartz/QCComposition) object into the view.

[`-  loadedComposition`](/documentation/Quartz/QCView/loadedComposition())

Returns the composition loaded in the view.

[`-  unloadComposition`](/documentation/Quartz/QCView/unloadComposition())

Unloads the composition from the view.

### Managing the Erase Color

[`-  erase`](/documentation/Quartz/QCView/erase())

Clears the view using the current erase color.

[`-  eraseColor`](/documentation/Quartz/QCView/eraseColor())

Retrieves the current color used to erase the view.

[`-  setEraseColor:`](/documentation/Quartz/QCView/setEraseColor(_:))

Sets the color used to erase the view.

### Setting and Getting Event Masks

[`-  eventForwardingMask`](/documentation/Quartz/QCView/eventForwardingMask())

Retrieves the mask used to filter which types of events are forwarded from the view to the composition during rendering.

[`-  setEventForwardingMask:`](/documentation/Quartz/QCView/setEventForwardingMask(_:))

Sets the mask used to filter which types of events are forwarded from the view to the composition during rendering.

### Setting and Getting the Maximum Frame Rate

[`-  maxRenderingFrameRate`](/documentation/Quartz/QCView/maxRenderingFrameRate())

Returns the maximum frame rate for rendering.

[`-  setMaxRenderingFrameRate:`](/documentation/Quartz/QCView/setMaxRenderingFrameRate(_:))

Sets the maximum rendering frame rate.

### Managing Rendering

[`-  startRendering`](/documentation/Quartz/QCView/startRendering())

Starts rendering the composition that is in the view.

[`-  isRendering`](/documentation/Quartz/QCView/isRendering())

Checks whether a composition is rendering in the view.

[`-  autostartsRendering`](/documentation/Quartz/QCView/autostartsRendering())

Checks whether the view is set to start rendering automatically.

[`-  setAutostartsRendering:`](/documentation/Quartz/QCView/setAutostartsRendering(_:))

Sets whether the composition that is in the view starts rendering automatically when the view is put on the screen.

[`-  stopRendering`](/documentation/Quartz/QCView/stopRendering())

Stops rendering the composition that is in the view.

[`-  pauseRendering`](/documentation/Quartz/QCView/pauseRendering())

Pauses rendering in the view.

[`-  isPausedRendering`](/documentation/Quartz/QCView/isPausedRendering())

Returns whether or not the rendering in the view is paused.

[`-  resumeRendering`](/documentation/Quartz/QCView/resumeRendering())

Resumes rendering a paused composition.

### Using Interface Builder

[`-  play:`](/documentation/Quartz/QCView/play(_:))

Plays or pauses a composition in a view.

[`-  start:`](/documentation/Quartz/QCView/start(_:))

Starts rendering a composition in a view.

[`-  stop:`](/documentation/Quartz/QCView/stop(_:))

Stops rendering a composition in a view.

### Taking Snapshot Images

[`-  snapshotImage`](/documentation/Quartz/QCView/snapshotImage())

Returns an `NSImage` object of the current image in the view.

[`-  createSnapshotImageOfType:`](/documentation/Quartz/QCView/createSnapshotImage(ofType:))

Returns the current image in the view as an image object of the provided image type.

### Working With OpenGL

[`-  openGLContext`](/documentation/Quartz/QCView/openGLContext())

Returns the OpenGL context used by the view.

[`-  openGLPixelFormat`](/documentation/Quartz/QCView/openGLPixelFormat())

Returns the OpenGL pixel format used by the view.

### Notifications

[`QCViewDidStartRenderingNotification`](/documentation/Quartz/QCViewDidStartRenderingNotification)

Posted when the view starts rendering.

[`QCViewDidStopRenderingNotification`](/documentation/Quartz/QCViewDidStopRenderingNotification)

Posted when the view stops rendering.

## Relationships

### Conforms To

[`SendableMetatype`](/documentation/Swift/SendableMetatype)

[`NSUserInterfaceItemIdentification`](/documentation/AppKit/NSUserInterfaceItemIdentification)

[`Sendable`](/documentation/Swift/Sendable)

[`NSAnimatablePropertyContainer`](/documentation/AppKit/NSAnimatablePropertyContainer)

[`Hashable`](/documentation/Swift/Hashable)

[`CustomDebugStringConvertible`](/documentation/Swift/CustomDebugStringConvertible)

[`CVarArg`](/documentation/Swift/CVarArg)

[`NSObjectProtocol`](/documentation/ObjectiveC/NSObjectProtocol)

[`NSUserActivityRestoring`](/documentation/AppKit/NSUserActivityRestoring)

[`NSAccessibilityProtocol`](/documentation/AppKit/NSAccessibilityProtocol)

[`QCCompositionRenderer`](/documentation/Quartz/QCCompositionRenderer)

[`NSDraggingDestination`](/documentation/AppKit/NSDraggingDestination)

[`CustomStringConvertible`](/documentation/Swift/CustomStringConvertible)

[`NSAccessibilityElementProtocol`](/documentation/AppKit/NSAccessibilityElementProtocol)

[`Equatable`](/documentation/Swift/Equatable)

[`NSAppearanceCustomization`](/documentation/AppKit/NSAppearanceCustomization)

[`NSStandardKeyBindingResponding`](/documentation/AppKit/NSStandardKeyBindingResponding)

[`NSCoding`](/documentation/Foundation/NSCoding)

[`NSTouchBarProvider`](/documentation/AppKit/NSTouchBarProvider)

### Inherits From

[`NSView`](/documentation/AppKit/NSView)

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)