Disable Sheet Dismiss Swipe
Conditionally prevents interactive dismissal of presentations like popovers, sheets, and inspectors. Dragging the sheet is still possible to a limited extent, as shown in the screenshot, but it will never be dismissed.
Platform Compatibility
iOS 15.0+ iPadOS 15.0+ macOS 12.0+ watchOS 8.0+ tvOS 15.0+ visionOS 1.0+
Tags
SwiftUI Code
@State var showSheet = true
var body: some View {
Text("Foo")
.sheet(isPresented: $showSheet) {
sheetContent
.interactiveDismissDisabled()
}
}Found an issue or have a suggestion?
Created: January 31, 2026Updated: January 31, 2026