VoiceOver accessibility in a virtual musical instrument iPhone app?

て烟熏妆下的殇ゞ 提交于 2019-12-05 04:05:57

I can now answer my own question.

iOS 5 has added a new API exactly for this need:

[ mySubView setAccessibilityTraits: UIAccessibilityTraitAllowsDirectInteraction ];

will disable VoiceOver just for that UIView subview, but leave other subviews (other buttons, etc.) unaffected. This API allows an app to get responsive touch handlers more suitable for keying a musical instrument within the specified subview, even with VoiceOver enabled and providing assistance for other portions of the app's UI outside the specified UIView.

I don't think it's possible for you the developer to turn off VoiceOver, and as you've discovered it's impractical for users to play an instrument with Voiceover intercepting gestures.

I think it's acceptable to leave this in the hands of the user. It's easy to toggle Voiceover off/on by triple-tapping the home button, although this is off by default (users can turn it on via Settings > General > Accessibility > Triple-click Home). With that option engaged, users can explore your interface with Voiceover on, then toggle it off when they're ready to make music, and toggle it back on again when they're finished.

With that in mind you just need to be sure all interactive components (e.g., piano keys, parts of the drum kit) have meaningful labels.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!