How do you stop the rotation of a custom drawn CALayer on the iPhone?
This
CATransform3D pausetransform = ((CALayer *)[layer presentationLayer]).transform;
[layer removeAllAnimations];
layer.transform = pausetransform;
stops the animation, then immediately rotates the layer back a little bit. Probably because after the pausetransform value is set the animation continues for a short while.
Setting the layer.transform value in the animation's - (void) animationDidStop:(CAAnimation *)theAnimation finished:(BOOL)finishednormally
delegate method briefly displays the layer in the starting position of the animation before it rotates to the correct position.