• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Impossible to run image picker or camera in landscape mode?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Impossible to run image picker or camera in landscape mode?


  • Subject: Impossible to run image picker or camera in landscape mode?
  • From: Carl Hoefs <email@hidden>
  • Date: Tue, 14 Oct 2014 12:54:25 -0700

Xcode 6.0.1, iOS 7

My iOS app is landscape-only. When I try to bring up the camera image picker:

    [self presentViewController:self.imagePickerController animated:YES completion:nil];

I get the following error:

*** Terminating app due to uncaught exception 'UIApplicationInvalidInterfaceOrientation', reason: 'Supported orientations has no common orientation with the application, and shouldAutorotate is returning YES’

I have “Landscape Left” and “Landscape Right” selected for the app orientations in Xcode. Additionally I have these in the root view controller:

- (BOOL)shouldAutorotate {
    return NO;
}

- (NSUInteger)supportedInterfaceOrientations {
    return UIInterfaceOrientationMaskLandscapeLeft | UIInterfaceOrientationMaskLandscapeRight;
}

- (IBAction) showImagePickerForCamera:(id)sender {
    [self showImagePickerForSourceType:UIImagePickerControllerSourceTypeCamera];
}

The error goes away if I select Portrait orientation mode in Xcode, but then the camera interface is presented in portrait mode. How can I run the photo image picker or camera in landscape mode?
-Carl


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden


  • Prev by Date: Re: How to switch between Debug and Release builds
  • Next by Date: OS X Swift development?
  • Previous by thread: Re: How to switch between Debug and Release builds
  • Next by thread: OS X Swift development?
  • Index(es):
    • Date
    • Thread