iPadOS 18 TabView with Large Navigation Title

I’m following the example code from Apple to implement the new iPadOS 18 TabView() with the new Tab(). While the tabbing itself is working fine, I can’t get it to show up a (large) navigation title in the sidebar (like the Home or Files app).

I’ve tried placing .navigationTitle("App Name") at the TabView, but that doesn’t work. Is it possible to do this in any way or is this not recommended to show?

TabView {
    Tab("Overview", systemImage: "film") {
        Text("Put a OverviewView here")
    }
    
    TabSection("Watch") {
        Tab("Movies", systemImage: "film") {
            Text("Put a MoviesView here")
        }
        
        Tab("TV Shows", systemImage: "tv") {
            Text("Put a TVShowsView here")
        }
    }
    
    TabSection("Listen") {
        Tab("Music", systemImage: "music.note.list") {
            Text("Put a MusicView here")
        }
        
        Tab("Podcasts", systemImage: "mic") {
            Text("Put a PodcastsView here")
        }
    }
}
.tabViewStyle(.sidebarAdaptable)
.navigationTitle("App Name")
.navigationBarTitleDisplayMode(.large)

I know that there is also the .tabViewSidebarHeader() modifier, but that adds any view above the scroll view content. Neither does that easily allow to make it look like the regular navigation title, nor does it actually display in the navigation bar at the top, when scrolling down.

Answered by DTS Engineer in 820150022

@alexander216

Apart from using .tabViewSidebarHeader(), there is no other supported way to achieve the desired functionality given the currently shipping system configurations.

You can please submit an enhancement request via Feedback Assistant (https://feedbackassistant.apple.com) and post the Feedback ID once you do.

For those wondering why not to wrap the whole TabView in a NavigationStack, this leads to weird results. This places the whole toolbar below the title. Also the button to toggle the sidebar is placed below the title instead of above:

Accepted Answer

@alexander216

Apart from using .tabViewSidebarHeader(), there is no other supported way to achieve the desired functionality given the currently shipping system configurations.

You can please submit an enhancement request via Feedback Assistant (https://feedbackassistant.apple.com) and post the Feedback ID once you do.

iPadOS 18 TabView with Large Navigation Title
 
 
Q