The anchorPoint
of a layer is an animatable property. This means, if you just set it, then the layer will animate to the new value by default. This animation is likely to generate the flickering you are seeing as the anchor point fights against the transforms you are making.
To prevent this, you need to make the update inside a CATransaction
with actions disabled:
[CATransaction begin];
[CATransaction setDisableActions:YES];
layer.anchorPoint = ...
[CATransaction commit];
This will immediately update the anchor point of your layer.
Normally, updating the anchor point also updates the frame of the view as well, so you'd normally want to set the frame after you've set the anchor point! unless this is already taken into account in the code above.