HomeiOS Developmentios - execute an accessibilityAction when swiping with two or three...

ios – execute an accessibilityAction when swiping with two or three fingers whereas VoiceOver is on?


Is there a native SwiftUI accessibility modifier that permits to carry out an motion when a consumer swipes horizontally with two or three fingers whereas VoiceOver is on? I’ve checked out numerous SwiftUI accessibility modifiers, however none of them appear to resolve my query.

The closest modifier I’ve discovered executes some motion based mostly on vertical finger motion:

.accessibilityAdjustableAction({ route in
    change route {
    case .increment:
        // carry out some motion right here
    case .decrement:
        // carry out some motion right here
    default:
        // carry out some motion right here
    }
})

Is there an analogous SwiftUI answer out there that may deal with horizontal swipe actions with a number of fingers?

Why do I would like this?
I’ve created a customized weekly calendar element in SwiftUI that permits customers to pick out a date and swipe by means of weeks of the yr (by swiping left or proper). The calendar works nice by itself, however I’m searching for an answer to allow customers to modify between weeks utilizing a customized accessibility swipe motion whereas VoiceOver is on. The specified accessibility conduct that I’m searching for is much like that of the native iOS Calendar app.

Thanks upfront for any response!

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

Recent Comments