<!--
{
  "availability" : [
    "iOS: 8.0.0 -",
    "iPadOS: 8.0.0 -",
    "macCatalyst: 14.0.0 -",
    "macOS: 10.11.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "PhotoKit",
  "identifier" : "/documentation/PhotosUI/PHContentEditingController",
  "metadataVersion" : "0.1.0",
  "role" : "Protocol",
  "symbol" : {
    "kind" : "Protocol",
    "modules" : [
      "PhotosUI"
    ],
    "preciseIdentifier" : "c:objc(pl)PHContentEditingController"
  },
  "title" : "PHContentEditingController"
}
-->

# PHContentEditingController

A protocol your custom view controller class implements to provide a user interface for your Photos extension.

```
@MainActor protocol PHContentEditingController : NSObjectProtocol
```

## Overview

The [`PHContentEditingController`](/documentation/PhotosUI/PHContentEditingController) protocol defines methods you implement in a custom view controller class in order to create a Photos extension. The Photos app hosts your extension’s view controller to provide a user interface for editing photo or video assets.

## Topics

### Working with Adjustment Data

[`canHandle(_:)`](/documentation/PhotosUI/PHContentEditingController/canHandle(_:))

Asks your extension whether it can continue working with the most recent edit that was made to an asset.

### Performing an Edit

[`startContentEditing(with:placeholderImage:)`](/documentation/PhotosUI/PHContentEditingController/startContentEditing(with:placeholderImage:))

Tells your extension that asset data is available for editing.

[`finishContentEditing(completionHandler:)`](/documentation/PhotosUI/PHContentEditingController/finishContentEditing(completionHandler:))

Asks your extension for edited asset data to finish the editing session.

### Canceling an Edit

[`shouldShowCancelConfirmation`](/documentation/PhotosUI/PHContentEditingController/shouldShowCancelConfirmation)

A Boolean value that determines whether Photos should prompt the user when canceling the editing session.

[`cancelContentEditing()`](/documentation/PhotosUI/PHContentEditingController/cancelContentEditing())

Tells your extension to cancel editing.



---

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)