UIAlert visual slow-down when UINavigationController popping
I have a UIAlert appear just before the UINavigationController pops a view controller off the stack. This causes a very visible slow-down; the current view darkens, pauses, slides to the new view, and then at last the UIAlert appears.
The slow-down is entirely undesirable; it looks terrible. Programmatically I need to fire the UIAlert before the view controller transition (although开发者_如何学运维 I do not need to wait for user interaction w/the UIAlert to continue) because that's where the data is.
So do I (a) make the data accessible to after-the-view-controller-pop and fire UIAlert then, (b) add some sort of time or function delay to the UIAlert so that it fires after-the-view-controller-pop, or (c) some otehr good suggestion?
Use performSelector:withObject:afterDelay:
[self performSelector:@selector(methodThatShowsAlert) withObject:nil afterDelay:0.5];
精彩评论