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?>, @ViewBuilder destination: () -> Destination, @ViewBuilder label: () -> Label) where V : HashableParameters
- tag:
The value of
selectionthat causes the link to presentdestination. - selection:
A bound variable that causes the link to present
destinationwhenselectionbecomes equal totag. - destination:
A view for the navigation link to present.
- label:
A view builder to produce a label describing the
destinationto present.