逆时针旋转Imageview swift3

时间:2016-10-27 09:44:53

标签: swift rotation swift3

嘿我想逆时针旋转imageView。在苹果文档中它说:

  

以弧度表示此矩阵旋转坐标的角度   系统轴。在iOS中,正值指定逆时针   旋转和负值指定顺时针旋转。在macOS中,   正值表示顺时针旋转和负值   指定逆时针旋转。

所以我做了以下事情:

self.image1.transform = CGAffineTransform(rotationAngle: CGFloat(M_PI))
self.image2.transform = CGAffineTransform(rotationAngle: CGFloat(-M_PI))

但两张图像顺时针旋转。

0 个答案:

没有答案
相关问题