Hi,
From what I saw, the NavigationStack
allows for different types but replaces the view on top of the previous view.
I want to use the sidebar in the NavigationSplitView
in a similar way to the macOS "Systems Settings" app, basically more like a top-level menu leading to different views instead of the same content view.
The only option I see is sticking with destination-based NavigationLinks
which breaks all the advantages of switching to the new way.
-
Does
navigationDestination(for:destination:)
work for NavigationSplitView? It would be so intuitive, especially with the NavigationSplitView defaulting to a Stack's behavior on smaller screens. -
If not, how can such a menu or multi-type list be achieved?
And
NavigationSplitView
seems to be hogging the focus on the sidebar, preventing the.ondeletecommand()
from executing on the content of the detail view.https://stackoverflow.com/questions/74429687/swiftui-ondeletecommand-doesnt-work-with-navigationsplitview-on-macos