UIImageView *image = [[UIImageView alloc]init];
image.frame = CGRectMake(50, 50, 200, 200);
image.image = [UIImage imageNamed:@"460.jpg"];
[self.view addSubview:image];
CGAffineTransform transform= CGAffineTransformMakeRotation(M_PI*0.38);
/*關(guān)于M_PI
#define M_PI? ? 3.14159265358979323846264338327950288
其實(shí)它就是圓周率的值,在這里代表弧度,相當(dāng)于角度制 0-360 度,M_PI=180度
旋轉(zhuǎn)方向?yàn)椋喉槙r(shí)針旋轉(zhuǎn)
*/
image.transform = transform;//旋轉(zhuǎn)