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.

View

Swipe Container

Only allows a single active swipe within a container.

Explore Swipe Container on iPhone in portrait, with SwiftUI code and Apple API documentation.

VStack {
    Section("Group1") {
        Text("Foo1")
            .swipeActions {
                Button(role: .destructive, action: action)
            }
        Text("Bar1")
            .swipeActions {
                Button(role: .destructive, action: action)
            }
    }
    .swipeActionsContainer()
    Text("Foo2")
        .swipeActions {
            Button(role: .destructive, action: action)
        }
    Text("Bar2")
        .swipeActions {
            Button(role: .destructive, action: action)
        }
}
iOS 27.0+ iPadOS 27.0+ macOS 27.0+ watchOS 27.0+ visionOS 27.0+

Every available iPhone screenshot for Swipe Container.

1 views