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.
201elements
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.
SwiftUI code
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)
}
}Compatibility
iOS 27.0+ iPadOS 27.0+ macOS 27.0+ watchOS 27.0+ visionOS 27.0+
Tags
Found an issue or have a suggestion?
All variants
Every available iPhone screenshot for Swipe Container.