Hello all,
I am using the following code to move a label from one position to another in x direction
CABasicAnimation *theAnimation;
theAnimation=[CABasicAnimation animationWithKeyPath:@"transform.translation.x"];
theAnimation.duration=1;
theAnimation.repeatCount=1;
theAnimation.autoreverses=NO;
theAnimation.fromValue=[NSNumber numberWithFloat:0];
theAnimation.toValue=[NSNumber numberWithFloat:80];
[lbl.layer addAnimation:theAnimation forKey:@"animateLayer"];
But in this case at the end of the animation the label shifts back to its original position. How to make sure it stays at the position where it is moved.
Is there any good way to do it without using timer and changing the coordinates on our own.