Is there a native SwiftUI accessibility modifier that allows to perform an action when a user swipes horizontally with two or three fingers while VoiceOver is on? I've looked at various SwiftUI accessibility modifiers, but none of them seem to solve my question.
The closest modifier I've found executes some action based on vertical finger movement:
.accessibilityAdjustableAction({ direction in
switch direction {
case .increment:
// perform some action here
case .decrement:
// perform some action here
default:
// perform some action here
}
})
Is there a similar SwiftUI solution available that can handle horizontal swipe actions with multiple fingers?
Why do I need this? I have created a custom weekly calendar component in SwiftUI that allows users to select a date and swipe through weeks of the year (by swiping left or right). The calendar works great on its own, but I am looking for a solution to enable users to switch between weeks using a custom accessibility swipe action while VoiceOver is on. The desired accessibility behavior that I am looking for is similar to that of the native iOS Calendar app.
Thank you in advance for any response!