<!--
{
  "availability" : [
    "iOS: 3.2.0 - 9.0.0",
    "iPadOS: 3.2.0 - 9.0.0",
    "macCatalyst: 13.1.0 - 13.1.0",
    "tvOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "UIKit",
  "identifier" : "/documentation/UIKit/UIPopoverController/setContentView(_:animated:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "c:objc(cs)UIPopoverController(im)setContentViewController:animated:"
  },
  "title" : "setContentView(_:animated:)"
}
-->

# setContentView(_:animated:)

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

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

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)