<!--
{
  "availability" : [
    "iOS: 17.0.0 -",
    "iPadOS: 17.0.0 -",
    "macCatalyst: 17.0.0 -",
    "macOS: 13.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "SwiftUI",
  "identifier" : "/documentation/SwiftUI/Scene/windowResizability(_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "SwiftUI"
    ],
    "preciseIdentifier" : "s:7SwiftUI5ScenePAAE18windowResizabilityyQrAA06WindowE0VF"
  },
  "title" : "windowResizability(_:)"
}
-->

# windowResizability(_:)

Sets the kind of resizability to use for a window.

```
nonisolated func windowResizability(_ resizability: WindowResizability) -> some Scene
```

## Parameters

`resizability`

The resizability to use for windows created by
this scene.

## Return Value

A scene that uses the specified resizability strategy.

## Discussion

Use this scene modifier to apply a value of type [`WindowResizability`](/documentation/SwiftUI/WindowResizability)
to a [`Scene`](/documentation/SwiftUI/Scene) that you define in your [`App`](/documentation/SwiftUI/App) declaration.
The value that you specify indicates the strategy the system uses to
place minimum and maximum size restrictions on windows that it creates
from that scene.

For example, you can create a window group that people can resize to
between 100 and 400 points in both dimensions by applying both a frame
with those constraints to the scene’s content, and the
[`contentSize`](/documentation/SwiftUI/WindowResizability/contentSize) resizability to the scene:

```
@main
struct MyApp: App {
    var body: some Scene {
        WindowGroup {
            ContentView()
                .frame(
                    minWidth: 100, maxWidth: 400,
                    minHeight: 100, maxHeight: 400)
        }
        .windowResizability(.contentSize)
    }
}
```

The default value for all scenes if you don’t apply the modifier is
[`automatic`](/documentation/SwiftUI/WindowResizability/automatic). With that strategy, [`Settings`](/documentation/SwiftUI/Settings)
windows use the [`contentSize`](/documentation/SwiftUI/WindowResizability/contentSize) strategy, while
all others use [`contentMinSize`](/documentation/SwiftUI/WindowResizability/contentMinSize).

---

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)