【发布时间】:2014-12-16 01:44:19
【问题描述】:
我想创建 iPad 相机,在此之前我会创建纵向的 iPhone 相机应用程序。
当我从相册(设备相册)中选择照片时,iPad 应用程序抛出错误:
Terminating app due to uncaught exception 'UIApplicationInvalidInterfaceOrientation', reason: 'Supported orientations has no common orientation with the application, and [PUUIAlbumListViewController shouldAutorotate] is returning YES'
这是我从相册中选择照片的代码:
UIImagePickerController *pickerController = [[UIImagePickerController alloc] init];
pickerController.delegate = self;
pickerController.sourceType = UIImagePickerControllerSourceTypePhotoLibrary;
pickerController.mediaTypes = @[(NSString *) kUTTypeImage];
pickerController.allowsEditing = NO;
[self presentViewController:pickerController animated:YES completion:nil];
我必须添加什么才能从 iPad 横向访问它?
【问题讨论】:
-
你想只使用纵向吗?你想在你的应用中支持什么方向
-
我的 iphone 版本显示为 potrait UI,这没问题。我的 ipad 版本显示为横向 UI,以前在尝试从需要纵向定位的设备相册中获取照片时出现问题。
标签: ios objective-c ipad