<!--
{
  "availability" : [
    "macOS: 10.4.0 - 10.15.0"
  ],
  "documentType" : "symbol",
  "framework" : "Quartz",
  "identifier" : "/documentation/Quartz/QCCompositionRenderer/value(forOutputKey:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Quartz"
    ],
    "preciseIdentifier" : "c:objc(pl)QCCompositionRenderer(im)valueForOutputKey:"
  },
  "title" : "value(forOutputKey:)"
}
-->

# value(forOutputKey:)

Returns the value for an output port of a composition.

```
func value(forOutputKey key: String!) -> Any!
```

## Parameters

`key`

The key associated with an output port for the root patch of a composition. This method throws an exception if `key` is invalid.

## Return Value

The value. The data type of returned value depends on the type of the output port. See [`QCPortAttributeTypeKey`](/documentation/Quartz/QCPortAttributeTypeKey) for more information.

---

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)