Reputation: 139
I am using UIAccessibilityPostNotification
and UIAccessibilityAnnouncementDidFinishNotification
in my app. According to this link, the notification should be posted either when the announcement finishes successfully or it does not (i.e. the user swipes to another element on the screen).
UIAccessibilityAnnouncementDidFinishNotification
expects an NSNotification dictionary
as a parameter from which you can determine the value spoken and whether or not the speaking has completed uninterrupted. Speaking may become interrupted if the VoiceOver
user performs the stop speech gesture or swipes to another element before the announcement finishes.
It works fine if the announcement finishes, but if I swipe or tap the screen before it finishes, no notification is posted. Any thoughts on why this might be? Could it be a bug? If so, any suggestions on workarounds? I have text coming in that needs to be read sequentially so am using this to synchronize. Even if I could somehow reset my speaking flag to 0 when the user taps the screen/does anything, that would be great.
Upvotes: 5
Views: 1861
Reputation: 17695
Create a custom view and that custom view needs to implement the protocol UIAccessibilityFocus
- (void)accessibilityElementDidBecomeFocused
- (void)accessibilityElementDidLoseFocus
- (BOOL)accessibilityElementIsFocused
Upvotes: 2