0

I have a tab view setup as below

struct TabBarView: View {
@Environment(\.managedObjectContext) private var viewContext

var body: some View {
    TabView {
        SetListView()
            .tabItem {
                Label("Set List", systemImage: "list.dash")
            }
        
        AllCardsView()
            .tabItem {
                Label("Card List", systemImage: "list.dash")
            }
        
        OwnedView()
            .tabItem {
                Label("Owned Cards", systemImage: "list.dash")
            }
        
        DecksView()
            .tabItem {
                Label("Decks", systemImage: "list.dash")
            }
        
        SettingsView()
            .tabItem {
                Label("Settings", systemImage: "gear")
            }
    }
}

}

Each individual view hs its own navigation view, created as such

var body: some View {
    NavigationView {
        List {
            // Do Stuff
        }
    }
}

I'm trying to make it so that on the first four tabs you can tap the tab an change back to the previous view.

I know previously you could use the popviewcontroller method but from what I can tell there's no equivalent switfui version

Ceri Turner
  • 830
  • 2
  • 12
  • 36

0 Answers0