CGAffineTransformScale和CATransform3DTranslate区别

来源:互联网 发布:类似slmmsk的软件 编辑:程序博客网 时间:2024/05/09 19:09
  1. CGAffineTransform 是用于2D层面的,操作 UIView或者其他 2D Core Graphics 元素的.

  2. 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使用
0 0