title: Running an animation one after the other fails
body: <p>I'm trying to animate an image to rotate left and right when selected, basically to let the user which the object they're touching.</p>
  
  <p>I found some code for animating:</p>
  
  <pre><code>- (void)rotateImage:(UIImageView *)image duration:(NSTimeInterval)duration 
                curve:(int)curve degrees:(CGFloat)degrees delay:(CGFloat)delay
  {
      // Setup the animation
      [UIView beginAnimations:nil context:NULL];
      [UIView setAnimationDelay:delay];
      [UIView setAnimationDuration:duration];
      [UIView setAnimationCurve:curve];
      [UIView setAnimationBeginsFromCurrentState:YES];
  
      // The transform matrix
      CGAffineTransform transform = 
      CGAffineTransformMakeRotation(DEGREES_TO_RADIANS(degrees));
      image.transform = transform;
  
      // Commit the changes
      [UIView commitAnimations];
  }
  </code></pre>
  
  <p>However, when I try to run two animations, only the last one ever works. Even with a proper delay, only the second animation will show:</p>
  
  <pre><code>[self rotateImage:self duration:.5 
                  curve:UIViewAnimationCurveEaseIn degrees:60 delay:0];
      [self rotateImage:self duration:.5 
                  curve:UIViewAnimationCurveEaseIn degrees:-60 delay:5];
  </code></pre>
  
  <p>What can I do to create the animation so it rotates left, then rotates right?</p>