<!--
{
  "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/shouldShowCancelConfirmation",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "PhotosUI"
    ],
    "preciseIdentifier" : "c:objc(pl)PHContentEditingController(py)shouldShowCancelConfirmation"
  },
  "title" : "shouldShowCancelConfirmation"
}
-->

# shouldShowCancelConfirmation

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

```
var shouldShowCancelConfirmation: Bool { get }
```

## Discussion

Implement a getter method for this property to customize the Photos app’s behavior when the user chooses to cancel content editing.

If you return `false` (the default), Photos immediately terminates your extension when the user cancels editing. Use this option when your extension’s state can be easily recreated—that is, if the user loses no significant effort by canceling editing. For example, this option is appropriate for extensions that offer a simple choice between several preconfigured image filters.

If you return `true`, Photos shows an alert to confirm the user’s choice to cancel. Use this option when the user has invested significant effort in your extension workflow that would be lost when canceling. This option is appropriate if the user creates new content during the editing process (for example, in an extension that lets a user “paint” on an image).

---

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)