Call method with parameters after animation completion
- by Jean
I want to call a method with certain parameters once an animation is done.
The flow is something like this:
-(void) myMethod:(int)val
{
[self performAnimation];
[self doSomethingElse:val]; // This should be done after animation completion
}
I presume the 'doSomethingElse' method needs to be called from the method defined in 'setAnimationDidStopSelector' - or is there a way to have the animation block until done?
What is the best way to let the method called on 'setAnimationDidStopSelector' know about the method it needs to call and its parameter? Can this be done with selectors? Or is the only way of doing this by storing the methods and its params in class temp variables and access them when needed?