Discussion 議論
For example, this is how a custom action to compose a new email could be added to a view.
var body: some View {
ContentView()
.accessibilityAction(named: "New Message") {
// Handle action
}
}
Availability 有効性
Technology
func accessibilityAction<S>(named name: S, _ handler: @escaping () -> Void
) -> ModifiedContent
<Content, Modifier> where S : StringProtocol
Modifier
is AccessibilityAttachmentModifier
.For example, this is how a custom action to compose a new email could be added to a view.
var body: some View {
ContentView()
.accessibilityAction(named: "New Message") {
// Handle action
}
}