<!--
{
  "availability" : [
    "iOS: 18.0.0 -",
    "iPadOS: 18.0.0 -",
    "macCatalyst: 18.0.0 -",
    "macOS: 15.0.0 -",
    "tvOS: 18.0.0 -",
    "visionOS: 2.0.0 -",
    "watchOS: 11.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "SwiftUI",
  "identifier" : "/documentation/SwiftUI/View/presentationSizing(_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "SwiftUI"
    ],
    "preciseIdentifier" : "s:7SwiftUI4ViewPAAE18presentationSizingyQrqd__AA012PresentationE0Rd__lF"
  },
  "title" : "presentationSizing(_:)"
}
-->

# presentationSizing(_:)

Sets the sizing of the containing presentation.

```
nonisolated func presentationSizing(_ sizing: some PresentationSizing) -> some View
```

## Parameters

`sizing`

A value dictating size to propose to presentation content
and how the presentation responds to changes in content size.

## Discussion

Use this modifier to apply a [`PresentationSizing`](/documentation/SwiftUI/PresentationSizing) to a
presentation like [`sheet(isPresented:onDismiss:content:)`](/documentation/SwiftUI/View/sheet(isPresented:onDismiss:content:)).
The `sizing` parameter defines the size proposed to the content, and the
presentation adopts the returned size. The default value is `automatic`.

Sizings can be modified to fix their dimensions based on the content,
and optionally be sticky.

> Seealso: ``doc://com.apple.SwiftUI/documentation/SwiftUI/PresentationSizing/fitted(horizontal:vertical:)`` and
> ``doc://com.apple.SwiftUI/documentation/SwiftUI/PresentationSizing/sticky(horizontal:vertical:)``.

> Note: If the presentation’s root container is a `NavigationSplitView`,
> the proposed width only applies to the `detail` column. The `sidebar`
> and `content` column widths use system-provided values, or those from
> ``doc://com.apple.SwiftUI/documentation/SwiftUI/View/navigationSplitViewColumnWidth(_:)`` or
> ``doc://com.apple.SwiftUI/documentation/SwiftUI/View/navigationSplitViewColumnWidth(min:ideal:max:)`` modifiers.

For example, a presentation with facts about flowers could
prefer `.page` sizing because its content is primarily
informational. Since the user can choose different flowers from the
picker, each with different lengths of information, the size is fitted
vertically to size the sheet to the textual content, and vertically
sticky is specified to prevent the presentation from changing size too
frequently as the user changes selection.

```
struct ContentView: View {
    @State private var presentInfo = true

    var body: some View {
        ContentView.sheet(isPresented: $presentInfo) {
            VStack {
                Picker("Flower Species", selection: $flower) {
                    ForEach(Flower.allCases) {
                        Text($0.rawValue.uppercased()).tag($0)
                    }
                }
                Text(flower.emoji).font(.largeTitle)
                Text(flower.informationalText)
            }
            .frame(maxHeight: .infinity, alignment: .top)
            .padding()
            .presentationSizing(
                .page
                    .fitted(horizontal: false, vertical: true)
                    .sticky(horizontal: false, vertical: true))
        }
    }
}
```

---

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)