How to control which UIAccessibilityElement receives focus after posting screen change notification?

老子叫甜甜 提交于 2020-01-05 10:08:42

问题


I have an overlay with accessible elements. When it disappears, I post UIAccessibilityScreenChangedNotification to cause VoiceOver update.

VoiceOver then picks first element of the screen. How can I make it focus on a specific element by default after posting UIAccessibilityScreenChangedNotification?


回答1:


When you post the notification you can supply additional information which is either an NSString object that VoiceOver speaks or an accessibility element that VoiceOver moves to.

UIAccessibilityPostNotification(UIAccessibilityScreenChangedNotification, focusItem);


来源:https://stackoverflow.com/questions/17903549/how-to-control-which-uiaccessibilityelement-receives-focus-after-posting-screen

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