ToolbarTitleAlignment
A preferred alignment for a navigation bar’s title.
Declaration
struct ToolbarTitleAlignmentOverview
Use values of this type with the toolbarTitleAlignment(_:) modifier to override the title alignment the system would use.
NavigationStack {
ContentView()
.navigationTitle("Library")
.toolbarTitleAlignment(.center)
}To read the alignment the system actually used, see toolbarTitleAlignment.