I want to accomplish following effect:
- User presses the button;
- VoiceOver speaks aloud a "processing" sentence;
- Performing some heavy processing.
Everything is being ran in main thread and I don't want GUI to be able to update in that time. For that, I'd like the method not to return before the end of heavy processing. I have following code:
UIAccessibilityPostNotification(UIAccessibilityAnnouncementNotification,
@"Processing");
heavyProcessing();
The problem is, that VoiceOver speaks the information after heavy processing has been completed.
How to make VoiceOver speak out the information "asynchronously", before method finishes and returns control to the main loop? If necessary, the heavy processing may be ran in another thread.