0

I am using IKImageView to show an image. Then, I used rotateImageLeft method to rotate image, image was rotated in IKImageView. But after I saved it,I had recognized that the image was not rotated, it is still original picture. Could you show me where is the problem. What should I do to save rotated picture in IKImageView

Thank you very much in advance!

NextTrang
  • 5
  • 5

1 Answers1

0

I resolved my problem with below code

- (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;
}
NextTrang
  • 5
  • 5