IKImageView无法旋转图像
问题描述:
我正在使用IKImageView来显示图像。然后,我使用rotateImageLeft方法旋转图像,图像在IKImageView中旋转。但是在我保存后,我已经认识到图像没有旋转,它仍然是原始图片。 你能告诉我问题在哪里。我应该怎么做才能保存IKImageView中的旋转图片IKImageView无法旋转图像
非常感谢您提前!
答
我解决我的问题,下面的代码
- (IBAction)rotateLeft: (id)sender
{
//@Next (04-Aug-2017): rotate image by library of IKImageView
currentRotationAngle = fmod(currentRotationAngle, 360.);
CGFloat radians = (currentRotationAngle + 90)*M_PI/180;
[_imageView setRotationAngle:radians];
currentRotationAngle +=90;
_imageRef = [_imageView image];
self.isUnsaveDocument = YES;
}