I can't just do
[myViewController dismissModalViewControllerAnimated:YES];
[myViewController presentModalViewController:nextModalViewController animated:YES];
one after the other, because then the two animation blocks try to affect the same references simultaneously and things break badly.
So what I need to do is make the latter call only after the first animation has finished. But there's no UIViewControllerDelegate
method like didDismissModalViewController
. What should I do?