views:

20

answers:

1

can I setup a function to be called once my animation is complete? I want to fade a view and then remove it from the superview.

A: 

Yes, that's easy:

When you configure your animation

[UIView setAnimationDelegate:self];
[UIView setAnimationDidStopSelector:@selector(myAnimationStopped:finished:context:)];

And define your method like:

-(void)myAnimationStopped:(NSString *)animationID finished:(NSNumber *)finished context:(void *)context
{
   // fancy code here
}

Doesn't have to be self and that method, of course.

Eiko
thanks - I was looking through all of the methods, can't believe I missed that one
Slee