title: Move UIImage across screen using core animation
body: <p>DO NOT POST ANSWERS ABOUT UIVIEW ANIMATIONS I understand UIView, I am learning core-animation. Im trying to get an image to move 50 units to the right but I am having many issues. First when the animation is called the image jumps to a new location, runs, then jumps back to the original location. I want it to simply move 50 units to the right, stop, move again if the button is pressed. I have spent a lot of time researching and I can't seem to find the problem. My Code:</p>
  
  <pre><code>-(IBAction)preform:(id)sender{
  
  CGPoint point = CGPointMake(imView.frame.origin.x, imView.frame.origin.y);
  imView.layer.position = point;
  
  CABasicAnimation *anim = [CABasicAnimation animationWithKeyPath:@"position.x"];
  anim.fromValue  = [NSValue valueWithCGPoint:point];
  anim.toValue    = [NSValue valueWithCGPoint:CGPointMake(point.x + 50, point.y)];
  anim.duration   = 1.5f;
  anim.repeatCount =1;
  anim.removedOnCompletion = YES;
  anim.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseIn];
  [imView.layer  addAnimation:anim forKey:@"position.x"];
  imView.layer.position = point;
  
  }
  </code></pre>