Initializer

init(_:isActive:destination:)

Creates a navigation link that presents a destination view when active, with a text label that the link generates from a title string.

Declaration 宣言

init<S>(_ title: S, isActive: Binding<Bool>, destination: () -> Destination) where S : StringProtocol
Available when Label is Text and Destination conforms to View.

Parameters パラメータ

title

A string for creating a text label.

isActive

A binding to a Boolean value that indicates whether destination is currently presented.

destination

A view for the navigation link to present.

See Also 参照

Presenting with Programmatic Activation