Hi Peter,
I probably need more context, but I'll try to write something useful (if you are using Core Animation). If you are using UIView animations, it could still be useful since the UIView animations use CAAnimations internally.
I would suggest that you use a CABasicAnimation (or another subclass of CAAnimation if you want more control) to do your animations.
Add the first animation to the view's CALayer when the first event comes in.
When the second event (or any subsequent) triggers, cancel all previous animations (removeAllAnimations or removeAnimationForKey:) and then add the second animation.
In this way your first animation is cancelled immediately, and your second animation will also start immediately.
Assuming that the first and the second animation both animate the same property on the same layer, you probably want the second animation to start from the current value (where the first animation stopped). To achieve this you can set the fromValue of the second animation to the value of the presentation layer (the value as displayed on the screen).
Something like:
CABasicAnimation * secondAnimation = [CABasicAnimation animationForKeyPath:@"transform"];
....set your other animation properties....
secondAnimation.fromValue = [NSValue valueWithCATranform3D:
((CALayer*)layerToAnimate.presentationLayer).transform];
[layerToAnimate addAnimation:secondAnimation forKey:@"myAnimation"];
UIViewAnimationOptionBeginFromCurrentState is the UIView equivalent for this.
If your animations always use the same key, then your old animation will be overwritten by the new animation (and thus the first animation gets cancelled automatically).
Hope it helps ;)
Cheers,