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?