Search code examples
iossynchronizationnotificationsvoiceoveruiaccessibility

UIAccessibilityAnnouncementNotification asynch issue


I noticed that the UIAccessibility post notification method is some kind of asynch call. This sounds to me quite right because you need to ear last events and not those happened yesterday... But see this example:

UIAccessibilityPostNotification( UIAccessibilityAnnouncementNotification, @"String 1");
UIAccessibilityPostNotification( UIAccessibilityAnnouncementNotification, @"String 2");

You can ear only "string 2".

This example is quite simple, you could answer that one can append "string 2" to "string 1" and the problem is solved. But I'm in a situation such that, but I can't append two string.

My question is: is there a method to synchronize notifications?

Another example is the following. Let say that you have a tab-bar app. When you switch to a particular bar I'd like VoiceOver to say specific text. As you probability know, when you select a tab VoiceOver says itself something like "Bar1 bar selected".

So... the VoiceOver announcement cover my own specific text.


Solution

  • For iOS 6.0+ you may use UIAccessibilityAnnouncementDidFinishNotification to synchronize your announcements.