I have a weird problem with CALayer animations. List of actions which lead to this:
- I add an opacity animation to a
CALayer(CAKeyframeAnimation). FillMode beingkCAFillModeForwardsorkCAFillModeRemovedmakes no difference. - To resize that layer (after a screen rotation for example) I pause the animation at time
X, set theCALayerbeginTimeandtimeOffsetto0(just to be sure) and callremoveAllAnimations()on that layer. - I update the
frameof the layer. - Then I add the new opacity animation.
Problem is: The layer has the correct size and the opacity animations only after time X, before that it's stuck at full opacity and has its old size! Which is really strange, because the size was never animated and I changed the size while no animations were applied to the layer.
Also all superlayers have beginTime == 0 and timeOffset == 0.
Why does that happen?