Contents

prompt

A presentation style that displays a prompt to the user when the accessibility quick action is active.

Declaration

static var prompt: AccessibilityQuickActionPromptStyle { get }

Discussion

The following example shows how to add an accessibilityQuickAction(style:content:) to pause and resume a workout.

@State private var isPaused = false

var body: some View {
    WorkoutView(isPaused: $isPaused)
        .accessibilityQuickAction(style: .prompt) {
            Button(isPaused ? "Resume" : "Pause") {
                isPaused.toggle()
            }
        }
}

See Also

Getting built-in menu styles