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 Portakal
  • 1,774
  • 21
  • 37
Khawar Ali
  • 3,462
  • 4
  • 27
  • 55

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