Toolbar Title Alignment
Sets the preferred alignment of the navigation bar’s title. The navigation bar resolves the alignment of its title automatically based on context, and toolbar roles. Use this modifier to override that resolution.
Platform Compatibility
Tags
SwiftUI Code
NavigationStack {
Text("Foo")
.navigationTitle("Bar")
.toolbarTitleAlignment(.center)
.toolbarTitleDisplayMode(.inline)
}Found an issue or have a suggestion?
More Navigation Components
View allPreferred Top Column
Controls which column appears on top of the stack when NavigationSplitView collapses into a single stack in certain contexts, such as on iPhone, when iPhone Duo is closed, or on Apple Watch. By default, the sidebar appears on top. In this case, the detail column does instead.
Hide Sidebar Toggle
Removes the sidebar toggle toolbar item a NavigationSplitView adds by default.
Explore Other Components
Browse allUIKit Content Background colors
The UIKit colors that are also used in other components like in List and GroupBox
Overlay Arrangement Edge
The horizontal edge a view in an overlay arrangement occupies when the arrangement transitions to a horizontal layout. In this case, the primary view overlays the secondary view at the trailing edge when the screen is partially open in landscape.
System Image Label
Creates a label with a system icon image and a title generated from a localized string.
Disable Sheet Dismiss Swipe
Conditionally prevents interactive dismissal of presentations like popovers, sheets, and inspectors. Dragging the sheet is still possible to a limited extent, as shown in the screenshot, but it will never be dismissed.