CGAffineTransform 是用于2D层面的,操作 UIView或者其他 2D Core Graphics 元素的.
CATransform3D 是 Core Animation的结构体,是用来做更复杂的关于 CALayer 的3D操作.CATransform3D 有着与 OpenGL 模型视图矩阵相同的内部结构,原因在于 Core Animation 是建立在 OpenGL 之上的, CALayer是 OpenGL 结构的一种封装.
_label.transform = CGAffineTransformMakeRotation(90 *M_PI / 180.0);
_label.layer.transform = CATransform3DMakeRotation(1, 1, 1, 0);//配合layer使用
本文详细介绍了CGAffineTransform和CATransform3D的区别及应用。CGAffineTransform适用于UIView等2D元素的操作,而CATransform3D则为CALayer提供更为复杂的3D变换功能,并基于OpenGL实现。
2836

被折叠的 条评论
为什么被折叠?



