【问题标题】:iOS6 on iPad UIImagePickerController issueiPad UIImagePickerController 上的 iOS6 问题
【发布时间】:2013-11-08 22:01:40
【问题描述】:

我的应用程序使用 UIImagePickerContoller,它在 iOS 7(iPad 和 iPhone)上运行良好,但只能在 iOS 6 的 iPhone 上运行。在 iOS 6 的 iPad 上,当我单击使用此类的按钮时,它在模拟器中崩溃从照片库中选择一张图片,但在调试器日志中没有说明原因。我的应用仅限于纵向视图。代码如下:

-(IBAction)selectPicturePressed:(id)sender
{
    //Open a UIImagePickerController to select the picture
    UIImagePickerController *imgPicker = [[UIImagePickerController alloc] init];
    imgPicker.delegate = self;
    imgPicker.sourceType = UIImagePickerControllerSourceTypePhotoLibrary;

    [self.navigationController presentViewController:imgPicker animated:YES  completion:nil];
}

【问题讨论】:

  • 您是否有任何理由从控制器的导航控制器而不是控制器中显示选择器?

标签: ios ipad ios6 uiimagepickercontroller


【解决方案1】:

当源类型为照片库时,UIImagePickerController 必须呈现在 UIPopoverController 中。

【讨论】:

  • @bachma0507 很高兴能帮上忙。
猜你喜欢
  • 1970-01-01
  • 2011-10-06
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多