图片旋转的角度问题 CGAffineTransformMakeRotation

图片旋转的角度问题 CGAffineTransformMakeRotation

ImageView.transform=CGAffineTransformMakeRotation(oneAngle); 

这个oneAngle是double类型,代表弧度,弧度制的0-2pi相当于角度制的0-360。 为了直观可以这么用: CGAffineTransformMakeRotation(rotate * 1.57079633);  角度旋转为顺时针旋转。

rotate = 0 - 1 很显然,也就是0 - pi/2啦。


简单举个例子:
[imageView setTransform:CGAffineTransformMakeRotation(M_PI/2)];
就是将imageView旋转90度。

你可能感兴趣的:(iOS)