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

isDetailLink(_:)

Sets the navigation link to present its destination as the detail component of the containing navigation view.

Declaration 宣言

func isDetailLink(_ isDetailLink: Bool) -> some View
Available when Label conforms to View and Destination conforms to View.

Return Value 戻り値

A view that applies the specified detail link behavior.

Parameters パラメータ

isDetailLink

A Boolean value that specifies whether this link presents its destination as the detail component when used in a multi-column navigation view.

Discussion 議論

This method sets the behavior when the navigation link is used in a multi-column navigation view, such as DoubleColumnNavigationViewStyle. If isDetailLink is true, performing the link in the primary column sets the contents of the secondary (detail) column to be the link’s destination view. If isDetailLink is false, the link navigates to the destination view within the primary column.

If you do not set the detail link behavior with this method, the behavior defaults to true.