---
title: canResizeToFitContent
framework: uikit
role: symbol
role_heading: Instance Property
path: uikit/uiwindow/canresizetofitcontent
---

# canResizeToFitContent

A Boolean value that indicates whether the window’s constraint-based content determines its size.

## Declaration

```swift
var canResizeToFitContent: Bool { get set }
```

## Discussion

Discussion The default value of this property is false, which causes the window to maintain a fixed size. Setting this property to true allows the system to perform constraints-based window sizing, which updates the window’s size to match the space needed by its content. Window-size changes occur only when the app runs on macOS.

## See Also

### Configuring the window

- [rootViewController](uikit/uiwindow/rootviewcontroller.md)
- [windowLevel](uikit/uiwindow/windowlevel.md)
- [UIWindow.Level](uikit/uiwindow/level.md)
- [screen](uikit/uiwindow/screen.md)
