CATransform3DRotate and UIImageView

。_饼干妹妹 提交于 2019-12-05 03:53:47
Brad Larson

CATransform3DRotate() takes as its first parameter a transform to apply a rotation to. If you were looking to rotate the transform of your layer, you would use

[square.layer setTransform:CATransform3DRotate(square.layer.transform, -M_PI, 0, 0, 0)];

That said,if the problem that you are having is that the layer jerks back to the starting position at the end of the animation, all you need to do is set the animation's removedOnCompletion property to NO and its fillMode property to kCAFillModeForwards.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!