I'm animating a CALayer using CABasicAnimation and expecting the layer to remain in position when the animation completes. Nearly all solutions show the following, which works fine
animation.removedOnCompletion = NO;
animation.fillMode = kCAFillModeForwards;
However, the 2010 WWDC speaker in the Core Animation in Practice Part 1 (~38-41mins) says that most of the solutions to the disappearing layer found are "bogus" and the correct way to animate a layer is roughly the following
animation.fromValue = [NSNumber numberWithFloat:layer.position.y];
layer.position = CGPointMake(layer.position.y, endPoint);
animation.toValue = [NSNumber numberWithFloat:endPoint];
The reason given is that the removedOnCompletion/fillMode solution only freezes the presentation layer, and the actual layer still has its original position set.
Please correct me if I've misinterpreted the speaker.
If I have understood him correctly, when does it matter?
Thanks, Steve