I am creating an application that only works in landscape mode.
During sign up I want to open the camera or present a UIImagePickerController, but the app is crashing with the following error:
*** Terminating app due to uncaught exception 'UIApplicationInvalidInterfaceOrientation', reason: 'Supported orientations has no common orientation with the application, and [PUUIAlbumListViewController shouldAutorotate] is returning YES'
How can I present an Image Picker or Camera in Landscape?
I found solution, case closed. i add in my appdelegate.m:
-(NSUInteger)application:(UIApplication *)application
supportedInterfaceOrientationsForWindow:(UIWindow *)window
{
if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone)
return UIInterfaceOrientationMaskAll;
else /* iPad */
return UIInterfaceOrientationMaskAllButUpsideDown;
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With