I am in the process of migrating from NavigationView
as a root to NavigationSplitView
. My model supports various different objects, and what would fit into the content
column varies from a list, to a TabView
with a list within. This particular example (which I refer to from here on,) the lists hold two different objects within the model. The layout looked like this:
NavigationView // Used for sidebar, would now be NavigationSplitView(sidebar:content:detail)
- NavigationLink -> TabView
-> List(objectA)
-> Object-Specific DetailView
-> List(objectB)
-> Object-Specific DetailView
- NavigationLink -> List(objectC)
-> Object-Specific DetailView
- and more like the above
As it stood, there was no "third column" functionality, but with the new API I am seeking to achieve this.
I am however, hung up on how to change the detail pane properly from within these sub-views. Am I needing to pass the various objects up to the struct housing the root NavigationSplitView
?
I don't currently use anything like Scene Storage, or other frameworks currently besides using CoreData with CloudKit. I know there's lots I need to be reading, is there somewhere I can go that really goes through UI Navigation and Elements?
The end goal is a three-column application (including the sidebar as the first) that dynamically changes the content
column from the definition of NavigationSplitView
, but with a clear solution to changing the detail
column to display different views that are specific to each object.
Nesting a NavigationStack
would come close if it could adjust the parent NavigationSplitView
's detail column?