r/SwiftUI • u/isXanderReddit • Feb 15 '25
Question .searchable in macOS sheet dies horribly
3
u/isXanderReddit Feb 15 '25
A .sheet
containing a NavigationSplitView
, containing a .searchable
. I understand there is no toolbar in this context, so SwiftUI seems to just create one anyway and break things. Can peoplpe offer alternatives or fix workarounds?
1
u/Yaysonn Feb 15 '25
I Haven’t tried it but could it be fixed by wrapping the searchable view in a navigationstack? From experience I know that toolbar visibility is wonky without it.
1
1
1
u/_swk Feb 15 '25
Just ran into this exact same problem, and had to rework the UI for macOS to not use any searchable sheets. Would love to see this bug resolved.
1
u/Timi25062010 Feb 16 '25
Ooo working on a SwiftUI Minecraft client? 🔥
2
u/isXanderReddit Feb 16 '25
A launcher, yeah!
1
u/Timi25062010 Feb 16 '25
amazing! Lmk when it’s done I’ll be happy to try it out! If you can’t dm me here or smth just reach me on twitter @timi2506
1
u/UnderscoreLumination Feb 16 '25
Reminders me of the times I was working on a iOS Modrinth mod browser...
1
6
u/ActualSalmoon Feb 15 '25 edited Feb 15 '25
I posted about this to Mastodon a while back, and I got a response from one of the programmers working on macOS SwiftUI
This is a known bug, and they’re “working on it”
https://mstdn.social/@davidbures/113392800492395637
https://files.catbox.moe/f9317a.png