---
title: containerView
framework: uikit
role: symbol
role_heading: Instance Property
path: uikit/uipresentationcontroller/containerview
---

# containerView

The view in which the presentation occurs.

## Declaration

```swift
var containerView: UIView? { get }
```

## Discussion

Discussion UIKit sets the value of this property shortly after receiving the presentation controller from your transitioning delegate. The container view is always an ancestor of the presented view controller’s view. During transition animations, the container view also contains the presenting view controller’s view. When adding custom views to a presentation, add them to the container view. If your transition also employs custom animator objects, those objects can get this container view from the containerView property of the context object provided by UIKit.

## See Also

### Getting the presentation objects

- [presentingViewController](uikit/uipresentationcontroller/presentingviewcontroller.md)
- [presentedViewController](uikit/uipresentationcontroller/presentedviewcontroller.md)
- [presentedView](uikit/uipresentationcontroller/presentedview.md)
