I need to get some advice for a developer. He's having trouble getting UI Post notification working correctly. I'm pasting his question below. Is using dispatch_after block required to get the timing correct?
In many situations after a VO-modal screen/view disappears, I want to force the VO focus to be back on the originating control, rather than the default top-left-most control. For example: activating a button
produces a popover to select a setting. Once that setting is selected the VO focus should go back to the original button.
The only solution I've found to reliably do this is to call UIAccessibilityPostNotification(UIAccessibilityLayoutChangedNotification, <#originating control#>), but I typically have to wrap it in a delay, such
as a dispatch_after block. Otherwise the my UIAccessibilityPostNotification is interrupted for the OS to select it's own default VO focus.
I'm wondering if these delays are the best way to accomplish this, or if there is something else (something more deterministic) I should be doing?