NEW BOOK! SwiftUI Fundamentals: The essential guide to SwiftUI core concepts and APIs. Learn more ...NEW BOOK! SwiftUI Fundamentals:Master SwiftUI core concepts and APIs. Learn more...
Quick Tip Icon
Quick Tip

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)
}
Screenshot of a form sheet on iPad simulator

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.

SwiftUI Fundamentals by Natalia Panferova book coverSwiftUI Fundamentals by Natalia Panferova book cover

Deepen your understanding of SwiftUI!$35

The essential guide to SwiftUI core concepts and APIs

SwiftUI Fundamentalsby Natalia Panferova

  • Explore the key APIs and design patterns that form the foundation of SwiftUI
  • Develop a deep, practical understanding of how SwiftUI works under the hood
  • Learn from a former Apple engineer who worked on widely used SwiftUI APIs

Deepen your understanding of SwiftUI!

The essential guide to SwiftUI core concepts and APIs

SwiftUI Fundamentals by Natalia Panferova book coverSwiftUI Fundamentals by Natalia Panferova book cover

SwiftUI Fundamentals

by Natalia Panferova

$35