1
votes

I've built an HTML5 iPad web app in landscape mode, now I'm to the point I need to let the user add an image either from taking an image or choosing one from the camera roll.

Here's the problem:

The iPad is locked in landscape mode, user touches my button: 'Add Photo' Apple menu alerts: 'Take Photo or Video' or 'Choose Existing' User touches 'Take Photo or Video'.

When the Camera slides over and opens up the web app goes into portait mode!, and after the user takes the image or even cancels out of taking an image my web app is stuck in portrait mode and will not go back into landscape until you unlock the iPad, turn to portrait then back to landscape!!

Note: if the user selects 'Choose Existing' and uploads from the camera roll there is no issue.

Is there anything I can do? Is there a way to not provide the 'Take Photo or Video' option and only allow the 'Choose Existing' option?

Thank you in advance!

1
What version of iOS are you using? I'm facing a similar issue on iOS6.0.1 - Visionscaper
Same here iOS6.0.1, But I do believe this will force choose file only, and not allow the option to take photo. (if it helps you) jsfiddle.net/X23dx/1 - rodney

1 Answers

0
votes

I've run into a similar problem. In my case the camera roll is only showing in portrait mode on my iPad which I'm using in landscape. After looking through the API reference it looks like this is by design:

Important: The UIImagePickerController class supports portrait mode only. This class is intended to be used as-is and does not support subclassing. The view hierarchy for this class is private and must not be modified, with one exception. You can assign a custom view to the cameraOverlayView property and use that view to present additional information or manage the interactions between the camera interface and your code.

UIImagePickerController Reference