1

I have a iPad application in Landscape orientation (iOS7), but when I present a UImagePickerViewController (Camera), this can be in portrait mode and need to avoid it.

Is there any way to lock this portrait orientation?

    UIImagePickerController *imagePicker = [[UIImagePickerController alloc] init];
    imagePicker.delegate = self;
    imagePicker.sourceType =UIImagePickerControllerSourceTypeCamera;
    imagePicker.mediaTypes = [NSArray arrayWithObjects:(NSString *) kUTTypeImage,nil];
    imagePicker.allowsEditing = NO;

    [self presentViewController:imagePicker animated:YES completion:NULL];

Thanks In advance.

Edit: I have followed the next iOS7 iPad Landscape only app, using UIImagePickerController and now the bars of the camera and preview picture taken appears in landscape mode, but if I take a photo with iPad in portrait orientation (app keeps on landscape orientation) the preview image rotates 90 degrees and 2 black sections appear on each side.

So, what I need is avoid this rotation in preview picture in the UIImagePickerViewController.

Does anyone have any idea?

Community
  • 1
  • 1
mzurita
  • 690
  • 1
  • 14
  • 33
  • possible duplicate of [Force landscape orientation in UIImagePickerController](http://stackoverflow.com/questions/14618546/force-landscape-orientation-in-uiimagepickercontroller) – lootsch Apr 08 '14 at 09:40
  • Now see the question is duplicated… Sorry. I am following this http://stackoverflow.com/questions/20468335/ios7-ipad-landscape-only-app-using-uiimagepickercontroller/20468336#20468336 but it doesn't work as expected. – mzurita Apr 08 '14 at 10:15

0 Answers0