iPhone SwiftUI layouts

Explore SwiftUI APIs, components, and modifiers with interactive iPhone previews, Swift code, and Apple documentation. Compare every available orientation, appearance, and design.

Navigation

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.

Explore Toolbar Title Alignment on iPhone in portrait and landscape, with SwiftUI code and Apple API documentation.

NavigationStack {
    Text("Foo")
        .navigationTitle("Bar")
        .toolbarTitleAlignment(.center)
        .toolbarTitleDisplayMode(.inline)
}
iOS 27.2+ iPadOS 27.2+

Every available iPhone screenshot for Toolbar Title Alignment.

2 views