Contents

subtitle

Places the item in the subtitle area of the navigation bar.

Declaration

static let subtitle: ToolbarItemPlacement

Discussion

The view will be shown when the navigation bar renders its title inline, and takes precedence over the value provided to the View.navigationSubtitle(_:) modifier.

struct ContentView: View {
    var body: some View {
        NavigationStack {
            DetailView()
                .navigationTitle("Title")
                .navigationSubtitle("Subtitle")
                .toolbar {
                    ToolbarItem(placement: .subtitle) {
                        CustomNavigationSubtitle()
                    }
                }
        }
    }
}