如何在横向模式下强制显示相机屏幕

时间:2014-04-08 09:33:50

标签: objective-c ios7 camera orientation

我有横向风格的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的预览图片中避免这种旋转。

有没有人有任何想法?

0 个答案:

没有答案
相关问题