NavigationSplitView

I need help with this topic please. I'm interested in the three column layout version. Column one I want my list of Core Data Entities, Column two I want a list of my Core Data Entity's ListView items, and for Column three I want the detail view of the selected list view item.

Any help on figuring out the best way to accomplish this would be much appreciated.

Thanks

For column one I setup an enum enum Nav: String, Hashable, CaseIterable and the cases are the different Entity names. And then use a list to display them. For column two I'd need a way to show the ListView() for whatever Entity name was selected from column one. And then the third column you show the DetailView() of the selected ListView() item. I guess is my sudo way of thinking about how it should work. But maybe that's not a great way of how you'd go about it?

alright I think I have what I want. Curious if this is a good practice or not though, because I am just starting out at this stuff.

enum Nav: String, Hashable, CaseIterable {
  case view1 = "View 1"
  case view2 = "View 2"
  case view3 = "View 3"
}

struct Three ColumnContentView: View {

  @State private var selectedNav: Nav?

  var body: some View {
    NavigationSplitView {
      List(Nav.allCases, id: \.self, selection: $selectedNav) { nav in
        NavigationLink(nav.rawValue, value: nav)
      }
   } content: {
      switch selectedNav {
      case .view1:
        ViewOneView()
      case .view2:
        ViewTwoView()
      default:
       Text("Select a nav item")
     }
  } detail: {
     Text("select a list item")
}
}

now I just need to figure out how to get the detail view to show up correctly

NavigationSplitView
 
 
Q