<!--
{
  "availability" : [
    "iOS: 16.0.0 -",
    "iPadOS: 16.0.0 -",
    "macCatalyst: 16.0.0 -",
    "macOS: 10.10.0 -",
    "tvOS: 16.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 9.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AVFoundation",
  "identifier" : "/documentation/AVFoundation/AVAssetTrack/makeSampleCursor(presentationTimeStamp:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "AVFoundation"
    ],
    "preciseIdentifier" : "c:objc(cs)AVAssetTrack(im)makeSampleCursorWithPresentationTimeStamp:"
  },
  "title" : "makeSampleCursor(presentationTimeStamp:)"
}
-->

# makeSampleCursor(presentationTimeStamp:)

Creates a sample cursor and positions it at or near the specified presentation timestamp.

```
func makeSampleCursor(presentationTimeStamp: CMTime) -> AVSampleCursor?
```

## Parameters

`presentationTimeStamp`

The initial presentation timestamp of the sample cursor.

## Return Value

An instance of [`AVSampleCursor`](/documentation/AVFoundation/AVSampleCursor).

## Discussion

If the track’s [`asset`](/documentation/AVFoundation/AVAssetTrack/asset) property value for [`providesPreciseDurationAndTiming`](/documentation/AVFoundation/AVAsset/providesPreciseDurationAndTiming) is <doc://com.apple.documentation/documentation/Swift/true>, the sample cursor is accurately positioned at the track’slast media sample with a presentation timestamp less than or equal to the desired timestamp, or, if there are no such samples, the first sample in presentation order.

If the track’s [`asset`](/documentation/AVFoundation/AVAssetTrack/asset) property value for [`providesPreciseDurationAndTiming`](/documentation/AVFoundation/AVAsset/providesPreciseDurationAndTiming) is <doc://com.apple.documentation/documentation/Swift/false>, and it’s prohibitively expensive to locate the precise sample at the desired timestamp, the sample cursor may be approximately positioned.

---

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)