SwiftUI sheet sizing updates on iPadOS 18
For a while, presenting a form sheet in SwiftUI, equivalent to the UIModalPresentationStyle.formSheet, was a challenge. With iPadOS 18, SwiftUI introduced more flexibility, making it easier to control sheet sizing on iPad.
On iPadOS 17 and earlier, sheets in a regular size class were always presented as large sheets (also known as page sheets), with no built-in way to adjust their size in SwiftUI, unless we wrapped UIKit or implemented a fully custom modal presentation.
Starting with iPadOS 18, the default sheet size became smaller, aligning with the traditional form sheet style. Additionally, the presentationSizing(_:) modifier was introduced, allowing us to explicitly define a sheet’s size.
For example, specifying .form
ensures a compact, centered appearance, independent of future default behavior changes:
.sheet(isPresented: $showSheet) {
Text("Sheet content...")
.presentationSizing(.form)
}

We can also enforce a page
sheet size for informational content, fit the sheet to its content, or define fully custom sizing logic.
These updates make sheet presentation more adaptable, giving us greater control over how modals appear in SwiftUI. For more details, see the PresentationSizing documentation.
If you want to build a strong foundation in SwiftUI, my new book SwiftUI Fundamentals takes a deep dive into the framework’s core principles and APIs to help you understand how it works under the hood and how to use it effectively in your projects.
For more resources on Swift and SwiftUI, check out my other books and book bundles.