Hiding the tabBar

How do I hide the tabBar for certain navigations?

I am aware of .toolbar(.hidden, for: .tabBar) but it has issues.

Here is the effect I actually want (screenshot is of transitioning from one page to another)

The .toolbar modifier doesn't work like that. Once the other page has been navigated to, it then shows the tabBar. That isn't what I want: I want the toolbar to be visible on the other page while swiping from page to page.

I am on iOS 18/Sequoia.

This is my code:

        NavigationStack {
                    List {
                        NavigationLink("your bday plans") {
                            Text("birthday email!")
                                .toolbar(.hidden, for: .tabBar)
                        } 
            }
            .navigationTitle("Mail")
        }

@olliew Are you using the tabItem API or Tab(title:image:value:content:) API?

And could you please provide a complete code snippet or a test project focused on your issue. see Creating a test project.

@DTS Engineer I am using the new Tab API

struct RoutingUIView: View {
    var body: some View {
        TabView {
            Tab("Posts", systemImage: "square.fill.text.grid.1x2") {
                MailView()
            }
            Tab("Settings", systemImage: "gearshape") {
                SettingsView()
            }
        }

    }
}

struct MailView: View {
    var body: some View {
        NavigationStack {
                    List {
                        NavigationLink("An important post...") {
                            Text("Lorem ipsum.")
                                .toolbar(.hidden, for: .tabBar)
                        }
            }
            .navigationTitle("Posts")
        }
    }
}

Any update on this?

Hiding the tabBar
 
 
Q