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,287
  • 3
  • 20
  • 45
  • 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,899
  • 3
  • 23
  • 35
0
myImage.center = CGPointMake(0, 0);    
myImage.transform = CGAffineTransformMakeRotation([degreesToRadians:imageRotationFix]);
Kampai
  • 22,848
  • 21
  • 95
  • 95
wes. i
  • 627
  • 9
  • 26