CatalogPad

Try the new NavigationSplitView released with iOS 16 sdk.

Layout

Split the view in three :

  • A list of sections in the sidebar
  • A list of items from the selected section
  • A detail of the item selected.

RootView

The RootView is in charge to display the appropriated Views considering the user’s selection

var body: some View {

  NavigationSplitView {

    List(sections, id: \.self, selection: $sectionSelected) { section in
      Label(section.title, systemImage: section.systemImage)
    }

  } content: {
    //
    // Display the appropriate list of items
    //

  } detail: {
    //
    // Display the appropriate item selected
    //
  }

}

Sections

The sections are defined by a static list and are used directly by the RootView.

GitHub

View Github