Prioritize Sheet Content Scrolling
Configures the behavior of swipe gestures on a presentation. PresentationContentInteraction.scrolls prioritizes scrolling the content over resizing the sheet.
Platform Compatibility
Tags
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)
}
}