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
Sheet
Prioritize Sheet Content Scrolling
Configures the behavior of swipe gestures on a presentation. PresentationContentInteraction.scrolls prioritizes scrolling the content over resizing the sheet.
Explore Prioritize Sheet Content Scrolling on iPhone in portrait, with SwiftUI code and Apple API documentation.
SwiftUI code
@State var showSheet = true
var body: some View {
Text("Foo")
.sheet(isPresented: $showSheet) {
ScrollView {
ForEach(0 ..< 50) { i in
Text("Bar \(i)")
}
}
.presentationDetents([.medium, .large])
.presentationContentInteraction(.scrolls)
}
}Compatibility
iOS 16.4+ iPadOS 16.4+ macOS 13.3+ watchOS 9.4+ tvOS 16.4+ visionOS 1.0+
Tags
Found an issue or have a suggestion?
All variants
Every available iPhone screenshot for Prioritize Sheet Content Scrolling.