I’ve encountered what appears to be a SwiftUI rendering bug on iOS 26+ when using .presentationDetents.
When I present a sheet normally, any SwiftUI background (even a simple Color.clear or .background(Color.red.opacity(0.5))) correctly appears behind the sheet.
But the moment I add:
.presentationDetents([.medium])
…the exact same background starts rendering above the sheet, even though:
This feels like a regression in SwiftUI’s detent-sheet.
Minimal reproducible example
struct LoginScreen: View {
@State var show = false
var body: some View {
ZStack {
Color.red.opacity(0.3) // should stay under sheet
Button("Show") { show = true }
}
.sheet(isPresented: $show) {
Text("Sheet")
.presentationDetents([.medium]) // ← adding this causes incorrect stacking
}
}
}
Expected Behavior**
-
The red background should remain behind the sheet.
-
This is the case in iOS 18.5 / 18.6 and earlier versions.
-
This is also the case as long as
.presentationDetentsis not used.
Actual Behavior
-
On iOS 26.0 / 26.1, when
.presentationDetentsis applied, the root background (and overlays) draw above the sheet. -
This happens even in the simplest ZStack setup.
-
.zIndexdoes not fix the issue. -
.overlayexhibit the same incorrect ordering.
Environment
Is this a known regression with .presentationDetents behavior on iOS 26?
Is there a workaround that keeps the sheet above the app’s root backgrounds?
Any insight appreciated.