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
<Self, AccessibilityAttachmentModifier
> where S : StringProtocol
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
}
}