VoiceOver: how to implement button that behaves like keys in Calculator

瘦欲@ 提交于 2019-12-08 06:22:39

问题


When you focus on a digit key in the Calculator app when using VoiceOver (either by tapping it once, sliding a finger over it, or by swiping left/right to it), VoiceOver announces the button title. Then if you "activate" the button by double tapping, it presses the button and VoiceOver announces the character that was inserted into the Calculator display with a higher pitch than the button title announcement.

My question is: how can I get the same behavior for buttons in my app - repeat the button title in a higher pitch upon activating the button?

I've set the accessibility traits to Keyboard Key. I've tried to post an announcement notification but that announcement is not in a higher pitch.


回答1:


Override the accessibilityActivate method to perform certain actions when the user has invoked the action of your control.



来源:https://stackoverflow.com/questions/27288410/voiceover-how-to-implement-button-that-behaves-like-keys-in-calculator

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