iPhone SwiftUI layouts

Explore SwiftUI APIs, components, and modifiers with interactive iPhone previews, Swift code, and Apple documentation. Compare every available orientation, appearance, and design.

Sheet

Sheet Background

Sets the presentation background of the enclosing sheet using a shape style.

Explore Sheet Background on iPhone in portrait, with SwiftUI code and Apple API documentation.

@State var showSheet = true

var body: some View {
    Text("Foo")
        .sheet(isPresented: $showSheet) {
            sheetContent
                .presentationBackground(.blue)
        }
}
iOS 16.4+ iPadOS 16.4+ macOS 13.3+ watchOS 9.4+ tvOS 16.4+ visionOS 1.0+

Every available iPhone screenshot for Sheet Background.

1 views