Initializer

init(tag:selection:destination:label:)

Creates a navigation link that presents the destination view when a bound selection variable equals a given tag value.

Declaration 宣言

init<V>(tag: V, selection: Binding<V?>, destination: () -> Destination, label: () -> Label) where V : Hashable

Parameters パラメータ

tag

The value of selection that causes the link to present destination.

selection

A bound variable that causes the link to present destination when selection becomes equal to tag.

destination

A view for the navigation link to present.

label

A view builder to produce a label describing the destination to present.

See Also 参照

Presenting a Selectable Destination View