---
title: "step(byPresentationTime:wasPinned:)"
framework: avfoundation
role: symbol
role_heading: Instance Method
path: "avfoundation/avsamplecursor/step(bypresentationtime:waspinned:)"
---

# step(byPresentationTime:wasPinned:)

Moves the cursor by a given delta time on the presentation timeline.

## Declaration

```swift
func step(byPresentationTime deltaPresentationTime: CMTime, wasPinned outWasPinned: UnsafeMutablePointer<ObjCBool>?) -> CMTime
```

## Parameters

- `deltaPresentationTime`: The amount of time to move in the presentation timeline.
- `outWasPinned`: The system sets the value of this pointer to doc://com.apple.documentation/documentation/Swift/true if the cursor reaches the beginning or the end of the sample sequence before it reaches the requested time. You may specify nil if you’re not interested in this information.

## Return Value

Return Value The amount of time the cursor was moved along the presentation timeline. Because sample cursors snap to sample boundaries when stepped, this value may not be equal to the specified time delta even if the cursor was not pinned.

## See Also

### Navigating samples

- [step(byDecodeTime:wasPinned:)](avfoundation/avsamplecursor/step(bydecodetime:waspinned:).md)
- [stepInDecodeOrder(byCount:)](avfoundation/avsamplecursor/stepindecodeorder(bycount:).md)
- [stepInPresentationOrder(byCount:)](avfoundation/avsamplecursor/stepinpresentationorder(bycount:).md)
