how to rotate CALayer at one point

后端 未结 3 1346
萌比男神i
萌比男神i 2020-12-08 16:02

how to rotate CALayer at one selected point.

3条回答
  •  甜味超标
    2020-12-08 16:16

    Check out the CA documentation here.

    You want to set the transform to a CATransform3DRotate, for example:

    CATransform3D current = myLayer.transform;
    myLayer.transform = CATransform3DRotate(current, DEGREES_TO_RADIANS(20), 0, 1.0, 0);
    

提交回复
热议问题