Silver solution


Hello, I have this silver solution:

-(void) makeButtonSlide
// Create a basic animation
CABasicAnimation *mover = [CABasicAnimation animationWithKeyPath:@“position”];

[mover setDelegate:self];
[mover setFromValue:[NSValue valueWithCGPoint:CGPointMake(0.0,]];
[mover setToValue:[NSValue valueWithCGPoint:CGPointMake(100,]];

[mover setDuration:0.5];

// Set the timing function
CAMediaTimingFunction *tf =  [CAMediaTimingFunction
[mover setTimingFunction:tf];

[[timeButton layer] addAnimation:mover


which is similar to one posted on this site. However, the animation is a bit strange still.
The button slowly starts moving from the left edge of the screen towards center,
and then after some time, it jumps to the destination point.
In other words, the animation is not smooth.

Why is this the case??? Thank you.

ps. As I said if I correct coordinates in it, as in one of the solutions posted here,
animation is smooth.

EDIT: I found reason why it happens. The thing is when the animation finishes
the button is directly moved to its original position as it was set in the XIB file.
– why is this the case? should it be like this? thanks.