我的应用程序使用UIImagePickerContoller,它适用于iOS 7(iPad和iPhone),但仅适用于iOS 6的iPhone。在iOS 6的iPad上,当它点击按钮,该类使用此类从照片库中选择一张照片,但不表示调试器日志中的原因。我的应用仅限于纵向视图。代码如下:iPad上的iOS6 UIImagePickerController问题
-(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];
}
是否有任何理由说明您要从控制器的导航控制器而不是控制器中提出选取器? – Simon