I have a CALayer object. In viewDidLoad: I set a transform to it using layer.transform = CATransform3DRotate(CATransform3DIdentity, M_PI/8.0, 0, 0, 1);
This works.
After loading, I apply a CAKeyframeAnimation
to animate the rotation of that layer. It also works and animation finishes correctly. To prevent the layer from removing the animation after completion I use
animation.removedOnCompletion = NO;
animation.fillMode = kCAFillModeForwards;
All of this works fine. But a problem occurs when I try to change the transform again (without animation) layer.transform = CATransform3DRotate(CATransform3DIdentity, M_PI/8.0, 0, 0, 1);
. Nothing happens. Layer doesn't change its transform to what I have specified. If I run the animation again, the animation will happen. But cannot change the transform property without animation.
Any help is appreciated..