I have an iPad app with a classic sidebar. It's been working fine for years. Now with iPadOS 26 the sidebar sometime gets this fake transparency that makes it really hard to quickly grok. A part of Liquid Glass seems to be to sometimes (but not always) take whatever is in the secondary area (the main big content), blur it, mirror it and then use as the background for the sidebar. This is silly and does not work at all for an app like mine. It maybe looks decent if your background is a photo or similar, but not for an app that manages data. Not all views cause the sidebar to get this ugly unreadable background. In most of the cases the sidebar keeps its normal opaque background that it has always had.
See this example for how it looks when it's really bad:
This is how it should look. Notice that the content of the "main view" is pretty similar to the case where it gets the ugly background. The difference is the segmented thing at the top, ie. a different "root view".
Is there some good way for me to force the sidebar to always have an opaque background? I guess I could make a ZStack
and put a solid color as the background behind the sidebar, but those kinds of hacks are better to avoid.
This can not be how some UI designer envisioned that apps should look? Maybe I'm missing some new modifier or setting somewhere that would led me opt out from this aspect of Liquid Glass? Apart from this it looks pretty nice. There are some bugs where the contents of the main area gets clipped when the sidebar is shown, hidden and then shown again, but that's for another time (and it's surely known already (if the bug tracking system allowed me to search I could verify)).
So, any way to make my app look nice again?
Based on the docs this should be what I really want:
https://developer.apple.com/documentation/swiftui/view/backgroundextensioneffect(isenabled:)
It's supposed to disable the background, but it seems to not do anything at all. The code in the commented out region is still the only that works reliably.
NavigationSplitView(sidebar: {
sidebarView
//.background {
// Color.red
// .edgesIgnoringSafeArea(.all)
//}
}, detail: {
detailView
.backgroundExtensionEffect(isEnabled: false)
})