uiaccessibility

Dynamic Accessibility Label for CALayer

最后都变了- 提交于 2019-11-29 23:11:13
问题 How do I make a CALayer accessible? Specifically, I want the layer to be able to change its label on the fly, since it can change at any time. The official documentation's sample code does not really allow for this. 回答1: The following assumes that you have a superview whose layers are all of class AccessableLayer , but if you have a more complex layout this scheme can be modified to handle that. In order to make a CALayer accessible, you need a parent view that implements the

How can I queue multiple accessibility notifications for VoiceOver?

烂漫一生 提交于 2019-11-29 14:11:52
This is how I'm notifying the system to read out my elements: UIAccessibilityPostNotification(UIAccessibilityAnnouncementNotification, cell) The problem is that when I send multiple notifications, the one that is already reading gets interrupted! I want to be able to queue it... I also found in another question here that I should use attributed string: attributedString.addAttribute(NSAttributedStringKey( rawValue: UIAccessibilitySpeechAttributeQueueAnnouncement), value: true, range: range!.nsRange) What am I missing here? What am I missing here? I have made many tests to try and understand

Actual difference between UIAccessibilityLayoutChangedNotification and UIAccessibilityScreenChangedNotification?

老子叫甜甜 提交于 2019-11-28 16:28:48
问题 I’m trying to ascertain what exactly happens differently when posting a UIAccessibilityLayoutChangedNotification , and a UIAccessibilityScreenChangedNotification . From what I can see, I can use them interchangeably everywhere and nothing different happens. The Apple documentation simply says to use LayoutChanged when (for example) an element has been hidden or shown, and to use ScreenChanged if the entire screen changes, but I’m interested in what THEY do when I provide this information, and

How can I queue multiple accessibility notifications for VoiceOver?

半城伤御伤魂 提交于 2019-11-28 07:37:32
问题 This is how I'm notifying the system to read out my elements: UIAccessibilityPostNotification(UIAccessibilityAnnouncementNotification, cell) The problem is that when I send multiple notifications, the one that is already reading gets interrupted! I want to be able to queue it... I also found in another question here that I should use attributed string: attributedString.addAttribute(NSAttributedStringKey( rawValue: UIAccessibilitySpeechAttributeQueueAnnouncement), value: true, range: range!

Accessibility for iOS, VoiceOver read order issue

懵懂的女人 提交于 2019-11-27 22:28:48
Is it possible to change the order in which the VoiceOver feature for accessibility in iPad reads out the elements, when the 'Two-finger Flick Down' gesture is done? For the attached image, which contains 3 labels and a button, the VoiceOver reads the elements in the following way, Label 1 -> Label 2 -> Button -> Label 3 Can the order be changed to, Label 1 -> Label 2 -> Label 3 -> Button The quickest way to achieve this for your example is to place the three labels in a transparent UIView subclass to serve as a container for your labels. This subclass will have to be properly setup to let

Accessibility for iOS, VoiceOver read order issue

你。 提交于 2019-11-26 21:00:13
问题 Is it possible to change the order in which the VoiceOver feature for accessibility in iPad reads out the elements, when the 'Two-finger Flick Down' gesture is done? For the attached image, which contains 3 labels and a button, the VoiceOver reads the elements in the following way, Label 1 -> Label 2 -> Button -> Label 3 Can the order be changed to, Label 1 -> Label 2 -> Label 3 -> Button 回答1: The quickest way to achieve this for your example is to place the three labels in a transparent