---
title: "animationEnded(_:)"
framework: uikit
role: symbol
role_heading: Instance Method
path: "uikit/uiviewcontrolleranimatedtransitioning/animationended(_:)"
---

# animationEnded(_:)

Tells your animator object that the transition animations have finished.

## Declaration

```swift
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

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.

## See Also

### Performing a transition

- [animateTransition(using:)](uikit/uiviewcontrolleranimatedtransitioning/animatetransition(using:).md)
