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

# loadComposition(fromFile:)

Loads the composition file located at the specified path.

```
func loadComposition(fromFile path: String!) -> Bool
```

## Parameters

`path`

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

## Return Value

If unsuccessful, returns <doc://com.apple.documentation/documentation/Swift/false>; any composition that’s already loaded in the view remains loaded.

---

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)