<!--
{
  "availability" : [
    "macOS: 26.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CompositorServices",
  "identifier" : "/documentation/CompositorServices/LayerRenderer/Drawable/presentationFrameIndex",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "Compositor Services",
      "CompositorServices"
    ],
    "preciseIdentifier" : "c:@F@cp_drawable_get_presentation_frame_index"
  },
  "title" : "presentationFrameIndex"
}
-->

# presentationFrameIndex

The sequential index of a drawable’s frame.

```
var presentationFrameIndex: CompositorFrameIndex { get }
```

## Discussion

When your immersive space becomes visible, you start drawing frames of content.
Compositor Services assigns a sequential index to each frame to indicate its position in the final output.
You can use these indexes to differentiate frames during drawing or predict future frame indexes.
For example, you might start playback of an audio file when a specific frame appears.

---

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)