Contents

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 : Hashable

Parameters

  • title:

    A string for creating a text label.

  • destination:

    A view for the navigation link to present.

  • 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.

See Also

Creating links with view arguments