Scale with CGAffineTransform and set the anchor

后端 未结 2 1890
日久生厌
日久生厌 2020-12-23 12:11

If I understand correctly scaling a UIView with CGAffineTransform anchors the transformation to its center.

In particular:

         


        
2条回答
  •  囚心锁ツ
    2020-12-23 12:23

    Firstly #import and then set the anchor points of your view:

       [[self layer] setAnchorPoint:CGPointMake(0, 0)];
    

提交回复
热议问题