在ios中旋转imageview

在ios中旋转imageview,ios,objective-c,iphone,ios8.1,Ios,Objective C,Iphone,Ios8.1,我有3个图像,正方形,人像和风景。我想旋转的角度90,180,270和360度的图像。如何使用Objective-C?如果只想显示图像,请将其添加到图像视图中,然后执行以下操作: imageView.transform = CGAffineTransformMakeRotation(M_PI_2); 它会将图像旋转90度。希望这有帮助:) 试试这个 CG仿射变换 transform = CGAffineTransformRotate(self.imageView.transform, (M_P

我有3个图像,正方形,人像和风景。我想旋转的角度90,180,270和360度的图像。如何使用Objective-C?

如果只想显示图像,请将其添加到
图像视图中,然后执行以下操作:

imageView.transform = CGAffineTransformMakeRotation(M_PI_2);
它会将图像旋转90度。希望这有帮助:)

试试这个

CG仿射变换

transform = CGAffineTransformRotate(self.imageView.transform, (M_PI/2));

self.imageView.transform = transform;
ImageView将根据当前位置旋转