As an aside, you can also do the same sort of a callback for a UIView animation by wrapping your call to rotate a UIView in the following block of code
[UIView beginAnimations:nil context:NULL];
[UIView setAnimationDuration:0.5f];
[UIView setAnimationDelegate:self];
[UIView setAnimationDidStopSelector:@selector(rotationAnimationHasFinished:finished:context:)];
// Rotate the view here
[UIView commitAnimations];
and then defining a delegate method
- (void)rotationAnimationHasFinished:(NSString *)animationID finished:(BOOL)finished context:(void *)context;
{
// Handle the completion of the animation
}
within your delegate that will do whatever you need to after the animation has completed.