<!--
{
  "availability" : [
    "iOS: 8.0.0 -",
    "iPadOS: 8.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AVKit",
  "identifier" : "/documentation/AVKit/AVPlayerViewController/beginTrimming(completionHandler:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "AVKit"
    ],
    "preciseIdentifier" : "c:objc(cs)AVPlayerViewController(im)beginTrimmingWithCompletionHandler:"
  },
  "title" : "beginTrimming(completionHandler:)"
}
-->

# beginTrimming(completionHandler:)

Presents the system trimming interface controls inside the player view.

```
func beginTrimming(completionHandler handler: ((Bool) -> Void)? = nil)
```

```
func beginTrimming() async -> Bool
```

## Parameters

`handler`

A completion handler that the system calls with a Boolean value that indicates whether the user completed the trim operation, or if they canceled it.

## Discussion

After trimming is complete, you can access the trimmed range by querying the <doc://com.apple.documentation/documentation/AVFoundation/AVPlayerItem/forwardPlaybackEndTime> and <doc://com.apple.documentation/documentation/AVFoundation/AVPlayerItem/reversePlaybackEndTime> properties on the <doc://com.apple.documentation/documentation/AVFoundation/AVPlayerItem>.

For more information on supporting trimming in your app, see [Trimming and exporting media in visionOS](/documentation/AVKit/trimming-and-exporting-media-in-visionos).

---

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)