---
title: "setContentView(_:animated:)"
framework: uikit
role: symbol
role_heading: Instance Method
path: "uikit/uipopovercontroller/setcontentview(_:animated:)"
---

# setContentView(_:animated:)

Sets the view controller responsible for the content portion of the popover.

## Declaration

```swift
func setContentView(_ viewController: UIViewController, animated: Bool)
```

## Parameters

- `viewController`: The new view controller whose content should be displayed by the popover.
- `animated`: Specify doc://com.apple.documentation/documentation/Swift/true if the change of view controllers should be animated or doc://com.apple.documentation/documentation/Swift/false if the change should occur immediately.

## See Also

### Configuring the popover content

- [contentViewController](uikit/uipopovercontroller/contentviewcontroller.md)
- [contentSize](uikit/uipopovercontroller/contentsize.md)
- [setContentSize(_:animated:)](uikit/uipopovercontroller/setcontentsize(_:animated:).md)
- [passthroughViews](uikit/uipopovercontroller/passthroughviews.md)
