<!--
{
  "availability" : [
    "iOS: -",
    "iPadOS: -",
    "macCatalyst: -",
    "tvOS: -",
    "visionOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "UIKit",
  "identifier" : "/documentation/UIKit/UIViewControllerAnimatedTransitioning/animationEnded(_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "c:objc(pl)UIViewControllerAnimatedTransitioning(im)animationEnded:"
  },
  "title" : "animationEnded(_:)"
}
-->

# animationEnded(_:)

Tells your animator object that the transition animations have finished.

```
optional func animationEnded(_ transitionCompleted: Bool)
```

## Parameters

`transitionCompleted`

Contains the value <doc://com.apple.documentation/documentation/Swift/true> if the transition completed successfully and the new view controller is now displayed or <doc://com.apple.documentation/documentation/Swift/false> if the transition was canceled and the original view controller is still visible.

## Discussion

UIKit calls this method at the end of a transition to let you know the results. Use this method to perform any final cleanup operations required by your transition animator when the transition finishes.

---

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)