---
title: "presentationTransitionDidEnd(_:)"
framework: uikit
role: symbol
role_heading: Instance Method
path: "uikit/uipresentationcontroller/presentationtransitiondidend(_:)"
---

# presentationTransitionDidEnd(_:)

Notifies the presentation controller that the presentation animations finished.

## Declaration

```swift
func presentationTransitionDidEnd(_ completed: Bool)
```

## Parameters

- `completed`: doc://com.apple.documentation/documentation/Swift/true if the animations completed and the presented view controller is now visible or doc://com.apple.documentation/documentation/Swift/false if the animations were canceled and the presenting view controller is still visible.

## Discussion

Discussion The default implementation of this method does nothing. Subclasses can override this method and use it to perform any required cleanup. For example, if the completed parameter is false, you would use this method to remove your presentation’s custom views from the view hierarchy. For an example of how to implement this method, see Add custom views to a presentation.

## See Also

### Tracking the transition’s start and end

- [presentationTransitionWillBegin()](uikit/uipresentationcontroller/presentationtransitionwillbegin().md)
- [dismissalTransitionWillBegin()](uikit/uipresentationcontroller/dismissaltransitionwillbegin().md)
- [dismissalTransitionDidEnd(_:)](uikit/uipresentationcontroller/dismissaltransitiondidend(_:).md)
