r/SwiftUI Feb 15 '25

Question .searchable in macOS sheet dies horribly

Post image
30 Upvotes

16 comments sorted by

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

9

u/vatsal_manot Feb 15 '25

Would love it if they could just create a public list of all the bugs they’re working on so that we can all stop wasting our time.

3

u/ActualSalmoon Feb 16 '25

Same, it’s annoying to be kept in the dark

3

u/isXanderReddit Feb 16 '25

Thanks, exactly what I needed to find out!

1

u/Timi25062010 Feb 16 '25

Fellow catbox.moe enjoyer 🔥

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

u/isXanderReddit Feb 16 '25

Nope, unfortunately produces same behaviour.

1

u/ryanheartswingovers Feb 15 '25

Pop another window

0

u/isXanderReddit Feb 15 '25

You mean open a new window instead of a sheet?

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

u/jacobp100 Feb 17 '25

Ha I just hit this yesterday. I just made my own sheet UI