outline
A presentation style that animates an outline around the view when the accessibility quick action is active.
Declaration
static var outline: AccessibilityQuickActionOutlineStyle { get }Discussion
Use the contentShape(_:_:eoFill:) modifier to provide a shape for focusEffect if necessary.
The following example shows how to add an accessibilityQuickAction(style:content:) to play and pause music.
@State private var isPlaying = false
var body: some View {
PlayButton(isPlaying: $isPlaying)
.contentShape(.focusEffect, Circle())
.accessibilityQuickAction(style: .outline) {
Button(isPlaying ? "Pause" : "Play") {
isPlaying.toggle()
}
}
}