Preventing Swipe-to-Dismiss on SwiftUI Sheets no longer working in iOS 18.1 (22B83)

The interactiveDismissDisabled() function in SwiftUI's Sheet no longer works as expected in iOS 18.1 (22B83). It was working as expected until iOS 18.0.1. Are there any other users experiencing the same issue?

struct ContentView: View {
    @State private var openSheet = false
    var body: some View {
        NavigationStack {
            Button("Open") {
                openSheet = true
            }
            .sheet(isPresented: $openSheet) {
                SheetView()
            }
        }
    }
}

struct SheetView: View {
    @Environment(\.dismiss) private var dismiss
    var body: some View {
        NavigationStack {
            Text("This is the Sheet")
            .toolbar {
                ToolbarItem(placement: .cancellationAction) {
                    Button("Cancel") { dismiss() }
                }
            }
            .interactiveDismissDisabled()
        }
    }
}

Supplementary information: In iOS 18.1, even Apple's native Journal app allows users to swipe-to-dismiss the sheet when creating a new entry. Previously, a confirmation dialog would be displayed, but this is no longer the case.​​​​​​​​​​​​​​​​

Answered by max_us in 811967022

I have revised my question and integrated it into this URL:

https://developer.apple.com/forums/thread/767475

Accepted Answer

I have revised my question and integrated it into this URL:

https://developer.apple.com/forums/thread/767475

Preventing Swipe-to-Dismiss on SwiftUI Sheets no longer working in iOS 18.1 (22B83)
 
 
Q