Question

Is it possible to have a portrait app that contains several different screens, however when the camera in the app is activated it switches to Landscape view and after the camera is done taking the picture returns back to portrait ?

(I want to force the user to only take landscape pictures).

Was it helpful?

Solution

if you read the https://developer.apple.com/library/ios/documentation/uikit/reference/UIImagePickerController_Class/UIImagePickerController/UIImagePickerController.html

you'll find out that the uiimagepickercontroller only supports portrait. here is the part from the class reference.

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.

the only way would be to create a custom camera overlay method and do it in that method.

OTHER TIPS

if u using some landscape gradient picture for hide the user to take picture in only landscape

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top