title: iOS "CABasicAnimation" brings component to the original position after animation complete
body: <p>I'm animating UIImageView using iOS core animation "CABasicAnimation", all works fine for me but the only problem is when i animate to the position, after completeing animation it comes back to original position where it was. how can i overcome this? i need to keep UIImageView in moved position.</p>
  
  <p>NOTE : I've seen few questions with success answers regarding this, but i have no idea why mine is not working like they say.</p>
  
  <p><a href="https://stackoverflow.com/questions/1376753/after-rotating-a-calayer-using-cabasicanimation-the-layer-jumps-back-to-its-unr">After rotating a CALayer using CABasicAnimation the layer jumps back to it's unrotated position</a></p>
  
  <p>Here is my sample code,</p>
  
  <pre><code>    CGPoint endPt = CGPointMake(160, 53);
      CABasicAnimation *anim5 = [CABasicAnimation animationWithKeyPath:@"position"];
      [anim5 setBeginTime:CACurrentMediaTime()+0.4];
      anim5.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseOut];
      anim5.fromValue = [NSValue valueWithCGPoint:imgRef.layer.position];
      anim5.toValue = [NSValue valueWithCGPoint:endPt];
      anim5.duration = 1.5;
      anim5.speed = 2;
      [imgRef.layer addAnimation:anim5 forKey:@"position"];
  
      //this is what other answers ask to do
      [anim5 setFillMode:kCAFillModeForwards];
      [anim5 setRemovedOnCompletion:NO];
  </code></pre>
  
  <p>BTW <code>[imgRef.layer setPosition:CGPointMake(160, 53)];</code> won't help me since i'm delaying animation with 4 milliseconds.</p>