init(_:destination:tag:selection:)
Creates a navigation link that presents a destination view when a bound selection variable matches a value you provide, using a text label that the link generates from a title string.
Declaration
nonisolated init<S, V>(_ title: S, destination: Destination, tag: V, selection: Binding<V?>) where S : StringProtocol, V : HashableParameters
- title:
A string for creating a text label.
- destination:
A view for the navigation link to present.
- tag:
The value of
selectionthat causes the link to presentdestination. - selection:
A bound variable that causes the link to present
destinationwhenselectionbecomes equal totag.