views:

49

answers:

1

In my app, I have a UIViewController presented modally with the default slide animation - let's call it 'A'. During the time 'A' is busy popping up it's possible another piece of code will try to use A to present a further modal viewcontroller.
On these occasions, I get an exception, presumably as 'A' isn't fully ready yet.

Does anyone know if there's a way of knowing if a UIViewController is still animating?

Thanks.

+1  A: 

After the modal animation the method

- (void)viewDidAppear:(BOOL)animated;

will be called. That's the indication that the animation is finished and there you can set a variable like

animationFinished = YES;
brutella
Thanks - perfect.
Ben Clayton