title: convert simple animation into a block based animation
body: <p>I have an animation that bounces a view slightly along the x axis. The problem is that is is using the old animation mechanism and as the documentation states use of block based animations are recommended for iOS4+. I'm wondering how I can turn this simple animation into a block based animation:</p>
  
  <pre><code>[UIView beginAnimations:@"bounce" context:nil];
  [UIView setAnimationRepeatCount:2];
  [UIView setAnimationRepeatAutoreverses:YES];
  self.view.center = CGPointMake(self.view.center.x + 10, self.view.center.y);
  [UIView commitAnimations];
  </code></pre>
  
  <p>Also I want the view to return to its starting position after the animation ends, the method above bounces the view and increments its x value by 10 pixels. </p>
  
  <p>Thanks for any help.</p>