Contents

init(isOn:intent:label:)

Creates a toggle performing an AppIntent.

Declaration

nonisolated init<I>(isOn: Bool, intent: I, @ViewBuilder label: () -> Label) where I : AppIntent

Parameters

  • isOn:

    Whether the toggle is on or off.

  • intent:

    The AppIntent to be performed.

  • label:

    A view that describes the purpose of the toggle.

See Also

Creating a toggle for an App Intent