I’d like to pop a display from inside a completion block, but I also want to dismissModalViewControllerAnimated from inside the same block (but AFTER the popup completes). Note that the popup schedules and runs after the completion block execution finishes, which means it never happens since the dismissal is synchronous…
So, a quick fix would be to find a way to schedule the dismissal asynchronously for after the popup. Is there a chaining method? A way to force holding async tasks to run and wait for them?
Use
-performSelector:withObject:afterDelay:. You’ll need to wrap the dismissal in a selector matching the signature required by-performSelector:..., sincedismissModalViewControllerAnimated:takes aBOOL.