Instance Method インスタンスメソッド

navigationTitle(_:)

Configures the view’s title for purposes of navigation, using a localized string. ビューのもつタイトルをナビゲーション目的のために構成設定します、ローカライズされた文字列を使います。

Declaration 宣言

func navigationTitle(_ titleKey: LocalizedStringKey) -> some View

Parameters パラメータ

titleKey

The key to a localized string to display. 表示することになるローカライズされた文字列に対するキー。

Discussion 議論

A view’s navigation title is used to visually display the current navigation state of an interface. On iOS and watchOS, when a view is navigated to inside of a navigation view, that view’s title is displayed in the navigation bar. On iPadOS, the primary destination’s navigation title is reflected as the window’s title in the App Switcher. Similarly on macOS, the primary destination’s title is used as the window title in the titlebar, Windows menu and Mission Control. あるビューのもつナビゲーションタイトルは、あるインターフェイスの現在のナビゲーション状態を視覚的に表示するために使われます。iOSとwatchOSでは、あるビューがあるナビゲーションビューの内側へとナビゲートされる時、そのビューのもつタイトルはナビゲーションバーにおいて表示されます。iPadOSでは、第一目的地のもつナビゲーションタイトルは、App Switcherにおけるウインドウのもつタイトルとして反映されます。同様にmacOSでは、第一目的地のもつタイトルは、タイトルバー、「ウインドウ」メニューそしてミッションコントロールにおけるウインドウタイトルとして使われます。

See Also 参照

Adding Titles