---
title: presentationController
framework: uikit
role: symbol
role_heading: Instance Property
path: uikit/uiviewcontroller/presentationcontroller
---

# presentationController

The presentation controller that’s managing the current view controller.

## Declaration

```swift
var presentationController: UIPresentationController? { get }
```

## Discussion

Discussion If the view controller is managed by a presentation controller, this property contains that object. This property is nil if the view controller isn’t managed by a presentation controller. If you’ve not yet presented the current view controller, accessing this property creates a presentation controller based on the current value in the modalPresentationStyle property. Always set the value of that property before accessing any presentation controllers.

## See Also

### Adding a custom transition or presentation

- [transitioningDelegate](uikit/uiviewcontroller/transitioningdelegate.md)
- [transitionCoordinator](uikit/uiviewcontroller/transitioncoordinator.md)
- [targetViewController(forAction:sender:)](uikit/uiviewcontroller/targetviewcontroller(foraction:sender:).md)
- [popoverPresentationController](uikit/uiviewcontroller/popoverpresentationcontroller.md)
- [sheetPresentationController](uikit/uiviewcontroller/sheetpresentationcontroller.md)
- [activePresentationController](uikit/uiviewcontroller/activepresentationcontroller.md)
- [restoresFocusAfterTransition](uikit/uiviewcontroller/restoresfocusaftertransition.md)
- [Customizing and resizing sheets in UIKit](uikit/customizing-and-resizing-sheets-in-uikit.md)
