Instance Method

navigationBarTitle(_:displayMode:)

Configures the title of the navigation bar for the view.

Declaration

func navigationBarTitle(_ title: Text, displayMode: NavigationBarItem.TitleDisplayMode) -> some View

Parameters

title

A description of this view to display in the navigation bar.

displayMode

The way to display the title.

Discussion

This modifier only takes effect when this view is inside of and visible within a NavigationView.

See Also

Configuring Navigation and Status Bar Views

func navigationBarHidden(Bool) -> View

Hides the navigation bar for the view.

func navigationBarTitle(LocalizedStringKey) -> View

Configures the title of this view's navigation bar with a localized string.

func navigationBarTitle<S>(S) -> View

Configures the title of this view’s navigation bar with a string.

func navigationBarTitle(Text) -> View

Configures the title in the navigation bar for the view.

func navigationBarTitle(LocalizedStringKey, displayMode: NavigationBarItem.TitleDisplayMode) -> View

Configures the title of this view's navigation bar with a localized string and a display mode.

func statusBar(hidden: Bool) -> View

Sets the visibility of the status bar for the view.