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

# setContentSize(_:animated:)

Changes the size of the popover’s content view.

## Declaration

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

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.

## See Also

### Configuring the popover content

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