2

In my application in working in portrait mode only. But application having one functionality which is Gallery. In Gallery ,user can view images and i want to rotate image in landscape and portrait mode . How can achieve this functionality in iOS.

Monika Patel
  • 2,107
  • 3
  • 18
  • 41
  • 2
    This might help - http://stackoverflow.com/questions/11667565/how-to-rotate-an-image-90-degrees-on-ios – Chetan Sep 04 '15 at 06:16

2 Answers2

2

You can rotate your image as in the Imageview by this

self.imageview.transform = CGAffineTransformMakeRotation(M_PI * 90 / 180.0);//90 as in 90 degree
Saheb Roy
  • 5,821
  • 2
  • 20
  • 35
0
myImage.center = CGPointMake(0, 0);    
myImage.transform = CGAffineTransformMakeRotation([degreesToRadians:imageRotationFix]);
Kampai
  • 22,335
  • 20
  • 91
  • 93
wes. i
  • 578
  • 7
  • 23