1

I have called a UIImagePickerController to take a photo but every time I take a photo, the camera automatically convert the image to portrait up although I want to take the image in the orientation it was taken.

In the didFinishPickingMediaWithInfo method, the returned image has the orientation UIImageOrientationUp every time.

In my parent controller, I have the following code:

-(BOOL)shouldAutorotate
{
    return YES;
}

-(NSUInteger)supportedInterfaceOrientations
{
    return UIInterfaceOrientationMaskAll;
}
Mehmet Emre
  • 1,794
  • 20
  • 35
Khawar Ali
  • 3,402
  • 4
  • 26
  • 52

1 Answers1

1

To rotate the UIImage to display properly when uploaded, you can use a category like this:

UIImage+fixOrientation.h

Here

Community
  • 1
  • 1