This happens because as soon as you change the anchorpoint of the layer, you will also change the centerpoint of the layer's view. Let's say the view's frame is 0,0,100,100 then per default the view's center is at 50,50 because the anchorpoint is set to 0.5,0.5. When you now change the the anchorpoint to 0,0.5 the view's center is now at 0,50 causing it to jump when it gets drawn the next time. To avoid this you have to update the view's center after you changed the anchorpoint. I've tested it within the GMGridView
you described:
case UIGestureRecognizerStateBegan:
{
[self transformingGestureDidBeginWithGesture:pinchGesture];
_transformingItem.contentView.layer.anchorPoint = CGPointMake(0,0.5);
CGPoint orgCenter = _transformingItem.contentView.center;
orgCenter.x -= _transformingItem.contentView.frame.size.width / 2.f;
[_transformingItem.contentView setCenter:orgCenter];
}
break;
I hope this answers your question.