iPhone Duo SwiftUI examples

Explore SwiftUI APIs, components, and modifiers on iPhone Duo. Compare portrait and landscape layouts in closed, partially open, and fully open states, with Swift code and Apple documentation.

Sheet

Sheet Placement

Sets the placement of a presentation within the presenting view. This may fall back to center on small screens.

Explore Sheet Placement on iPhone Duo in portrait and landscape across closed, partially open, and fully open states, with SwiftUI code and Apple API documentation.

@State var showSheet = true

var body: some View {
    Text("Foo")
        .sheet(isPresented: $showSheet) {
            sheetContent
                .presentationPlacement(.leading)
        }
}
iOS 27.0+ iPadOS 27.0+ macOS 27.0+ watchOS 27.0+ tvOS 27.0+ visionOS 27.0+

Every available iPhone Duo screenshot for Sheet Placement.

6 views