I'm writing an app that uses touchesBegan/Moved/etc
to track gestures and draw them on the screen. With VoiceOver on, when I double-tap on the drawing region, the first touch always comes through (to touchesBegan
) in the center of the View, regardless of where the tap actually occurred. Ideas?
I have set the View's accessibility properties to
self.isAccessibilityElement = true // Default is false.
self.accessibilityElementsHidden = false // Default is false anyway.
This is because VoiceOver traps gestures, and turns them into more basic events. This allows users with disabilities to more easily interact with applications. While this will completely break the accessibility of your application, and I don't necessarily recommend it. What you are looking for is the UIAccessibilityTraitAllowsDirectInteraction
. Again, this will completely break accessibility in almost all cases. But, in a drawing app, this may just make sense, and help accessibility for partially sited users.
You should make it clear for non-sighted users, that the app is a drawing space, and that normal VoiceOver gestures will need to be performed on other areas of the screen. Also, ensure that your view doesn't take up too much of the screen, so as inhibit standard use of VoiceOver.