我有一个横向方向的iPad应用程序(iOS7),但是当我呈现一个UImagePickerViewController(相机)时,这可以是纵向模式,需要避免它 .

有没有办法锁定这个纵向方向?

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];

提前致谢 .

编辑:我已经按照下一个iOS7 iPad Landscape only app, using UIImagePickerController现在相机的条形图和预览图片以横向模式显示,但是如果我以纵向拍摄带有iPad的照片(应用程序保持横向方向),预览图像会旋转90度和2每侧都出现黑色部分 .

所以,我需要的是在UIImagePickerViewController的预览图片中避免这种旋转 .

有谁有想法吗?