UISlider VoiceOver的无障碍特性? [英] UISlider accessibility traits for VoiceOver?
问题描述
要使UISlider在启用VoiceOver的情况下可用,需要哪些正确的UIAccessibility特性和处理程序?
What are are the proper UIAccessibility traits and handlers required to make a UISlider usable with VoiceOver enabled?
有关用户如何使用UISlider的说明VoiceOver已启用?
Are there any descriptions of how a user might use a UISlider with VoiceOver enabled?
推荐答案
这是我最后添加到UISlider的VoiceOver辅助功能:
Here's what I ended up adding to a UISlider for VoiceOver accessibility:
[ mySlider setIsAccessibilityElement:YES ];
[ mySlider setAccessibilityLabel:@"This slider controls blah blah etc...." ];
在控制事件UIControlEventValueChanged的目标方法中:
And in the target method for the control event UIControlEventValueChanged:
[ mySlider setAccessibilityValue = [ NSString stringWithFormat:@"Blah blah is set to %3.1f", mySlider.value];
启用VoiceOver后,当我向上和向下滑动时,向前),将焦点设置到该滑块后。
With VoiceOver enabled, this slider then spoke the new value as I swiped up and down (not back and forth) over it after setting the focus to that slider.
这篇关于UISlider VoiceOver的无障碍特性?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!