1
votes

I was taking photos through UIImagePickerController. When I captured a photo in Portrait mode, it was correctly displayed. But when i captured photo in Landscape mode it automatically rotated into portrait mode and was then displayed.

What are the possible ways to display a captured photo in Landscape mode when i capture photo in Landscape orientation.

Thanks in advance.

Is it possible if using CameraOverlayView??????

2
at where you are displaying the photo ? - Maulik

2 Answers

0
votes

Have a single method for orientation purposes and call it everytime -BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOri‌​entation is called.

0
votes

You can save the image with its UIImageOrientation attribute using the method:

- (id)initWithCGImage:(CGImageRef)imageRef scale:(CGFloat)scale orientation:(UIImageOrientation)orientation

This way, you can control the zoom as well, with the variable scale. You can refer to the various orientation values and use device orientation at the time of capturing the UIImage