<!--
{
  "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/setContentSize(_:animated:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "c:objc(cs)UIPopoverController(im)setPopoverContentSize:animated:"
  },
  "title" : "setContentSize(_:animated:)"
}
-->

# setContentSize(_:animated:)

Changes the size of the popover’s content view.

```
func setContentSize(_ size: CGSize, animated: Bool)
```

## Parameters

`size`

The new size to apply to the content view.

`animated`

Specify <doc://com.apple.documentation/documentation/Swift/true> if you want the change in size to be animated or <doc://com.apple.documentation/documentation/Swift/false> if you want the change to appear immediately.

## Discussion

When changing the size of the popover’s content, the width value you specify must be at least 320 points and no more than 600 points. There are no restrictions on the height value. However, both the width and height values you specify may be adjusted to ensure the popup fits on screen and is not covered by the keyboard.

---

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)