davidbures, 1 month ago Is there a way to display a .searchable field in a .sheet on macOS? I have this simplified code: NavigationStack { VStack { } .searchable } (the code above is in a .sheet) But the searchable field is not displaying 🤔 #swiftui #macdev
Is there a way to display a .searchable field in a .sheet on macOS?
.searchable
.sheet
I have this simplified code: NavigationStack { VStack { } .searchable } (the code above is in a .sheet) But the searchable field is not displaying 🤔
#swiftui #macdev
ctietze, 1 month ago @davidbures does it display on a VStack outside a sheet etc?
@davidbures does it display on a VStack outside a sheet etc?
davidbures, 1 month ago @ctietze I just tried it on a barebones project and yes, it does work
@ctietze I just tried it on a barebones project and yes, it does work
ctietze, 1 month ago @davidbures ah it goes into the toolbar; sheet's don't have that by default 🤔
@davidbures ah it goes into the toolbar; sheet's don't have that by default 🤔
davidbures, 1 month ago @ctietze I even tried to add a navigation title to the sheet and that still didn’t do anything 🤔 Do you have any other ideas I might try?
@ctietze I even tried to add a navigation title to the sheet and that still didn’t do anything 🤔 Do you have any other ideas I might try?
ctietze, 1 month ago @davidbures I'm not even sure you can display a window as a sheet on macOS with a toolbar!
@davidbures I'm not even sure you can display a window as a sheet on macOS with a toolbar!
davidbures, 1 month ago @ctietze 😢 so I suppose there’s no way to do it? It’s a shame that you can do it on iOS using the navigation stack trick, but not on macOS
@ctietze 😢 so I suppose there’s no way to do it? It’s a shame that you can do it on iOS using the navigation stack trick, but not on macOS
FredericBronner, 1 month ago @davidbures Is it possible it is being displayed in your main window in the navigation bar on the right? That is what was happening to mine and ended up putting a UIKit search bar in the sheet.
@davidbures Is it possible it is being displayed in your main window in the navigation bar on the right? That is what was happening to mine and ended up putting a UIKit search bar in the sheet.
davidbures, 1 month ago @FredericBronner I just checked and no, the field is not displayed in the main window
@FredericBronner I just checked and no, the field is not displayed in the main window
Add comment