从横向模式(iPad)的UIModalPresentationFormSheet呈现UIImagePickerController

时间:2015-07-13 11:56:01

标签: ios ipad uiimagepickercontroller

我试图在UIModalPresentationFormSheet模式下从iPad上呈现的控制器呈现UIImagePickerController。

但我总是收到以下错误

  

***由于未捕获的异常终止应用' UIApplicationInvalidInterfaceOrientation',原因:'支持   方向与应用程序没有共同的方向,并且   [PUUIAlbumListViewController shouldAutorotate]返回YES'

- (void)showPickerWithSourceType:(UIImagePickerControllerSourceType)sourceType {
    UIImagePickerController *picker = [[UIImagePickerController alloc] init];
    picker.delegate = self;
    picker.allowsEditing = YES;
    picker.sourceType = sourceType;

    [self presentViewController:picker animated:YES completion:nil];
}

如何以横向模式呈现它?

0 个答案:

没有答案