<!--
{
  "availability" : [
    "iOS: 4.0.0 -",
    "iPadOS: 4.0.0 -",
    "macCatalyst: 13.1.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "EventKitUI",
  "identifier" : "/documentation/EventKitUI/EKEventEditViewController/cancelEditing()",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "EventKit UI"
    ],
    "preciseIdentifier" : "c:objc(cs)EKEventEditViewController(im)cancelEditing"
  },
  "title" : "cancelEditing()"
}
-->

# cancelEditing()

Ends the editing session and discards any changes that were made to the event.

```
func cancelEditing()
```

## Discussion

This method is the programmatic equivalent of the user tapping Cancel. The delegate won’t receive the [`eventEditViewController(_:didCompleteWith:)`](/documentation/EventKitUI/EKEventEditViewDelegate/eventEditViewController(_:didCompleteWith:)) message, so you must dismiss the controller after calling this method.

---

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)