I have a UIView with several UILabels that is animating from top to bottom and vice versa. A sort of Autoque let\'s say :) I use 2 functions:
-(void)goUp
-(
Vladimir, the question about CAAnimations make sense.. but I found a way to 'pause' so I could keep using UIView animations:
CALayer *pLayer = [self.containerView.layer presentationLayer];
CGRect frameStop = pLayer.frame;
pausedX = frameStop.origin.x;
[UIView beginAnimations:nil context:NULL];
[UIView setAnimationBeginsFromCurrentState:YES];
[UIView setAnimationDuration:0.01];
[UIView setAnimationCurve: UIViewAnimationCurveLinear];
// set view properties
frameStop.origin.x = pausedX;
self.containerView.frame = frameStop;
[UIView commitAnimations];
What I'm doing here is using the presentationLayer to find out current x value of the animated view. After that I execute a new animation which overwrites the original animation. Make sure to setAnimationBeginsFromCurrentstate:YES for this. This cancels the original animation and puts the animated view not to it's destination position (which it does automatically ) but at the current position of the animation proces..
Hope this helps others too! :)