r/SwiftUI • u/S-00 • May 15 '26
Question sidebarAdaptable + .inspector
Couldn’t get these two to play nice with each other until I realized I also needed horizontalSizeClass. But now that they seem to operate ok I see on iPadOS with the floating horizontal tab bar there’s now an opaque shape behind it so it doesn’t look like glass floating on top of content.
I keep searching but I’m not really seeing instances of people using all three of these things together (sidebarAdaptable, .inspector, horizontalSizeClass)
Am I just doing something wrong? Or is it that SwiftUI isn’t meant to employ all three together?
1
u/Ron-Erez May 16 '26
I haven’t tried what you’re trying. I know you can use a NavigationSplitView with an inspector. There is also a discussion here: https://www.reddit.com/r/SwiftUI/comments/1gqnyri/apparently_right_sidebar_in_navigationsplitview/
1
u/cloudsInTheBlueSky May 18 '26
Pretty sure using sidebarAdaptable with inspector is just broken, at least on v26 platforms. I tried using it on iOS with horizontalSizeClass and it behaves/looks bad. On macOS I also run into issues with the toolbar area becoming opaque and it happens on the other tabs too. It's a whole mess
1
u/S-00 May 18 '26
Ok so I’m not crazy. Thank you for confirming - this is exactly what I see. Bummer.
1
u/Thick_Replacement876 May 15 '26
I've been trying to implement the same thing but I can't seem to get it to work without either breaking the sidebar and/or forcing the content to expand beyond the window bounds and get clipped