I’ve an app with backside sheets. I am unable to use the brand new design of iOS 26 for now, however I nonetheless need to use the system part. Apple permits this by setting the UIDesignRequiresCompatibility
property to YES
.
Nevertheless, I observed a bug the place, if the peak of a backside sheet is lower than ~200pt, the safeAreaInset.backside
is lower than the anticipated worth. I believe that is attributable to the default padding of backside sheets in iOS 26.
Moreover, constructing an app with Xcode 16.4 and working it on a tool with iOS 26 put in nonetheless displays the bug.
Is there any workaround or a approach to repair this with out constructing a customized part and adapting the brand new design?
Here’s a code instance:
import SwiftUI
struct ContentView: View {
@State var isPresented = false
var physique: some View {
Button(
motion: { isPresented = true },
label: { Textual content(verbatim: "iOS 26 with UIDesignRequiresCompatibility enabled") }
)
.sheet(isPresented: $isPresented) {
Shade.pink
.overlay { Textual content("50pt") }
.presentationDetents([.height(50)])
}
}
}
#Preview {
ContentView()
}
And here’s a consequence: