当我使用UIImagePicker从iPad中的照片库中选择图像时,模拟器会崩溃

时间:2012-09-08 13:25:53

标签: iphone

-(void) pickImage{
 UIImagePickerController *picker = [[UIImagePickerController alloc] init];
  picker.sourceType = UIImagePickerControllerSourceTypeSavedPhotosAlbum;
  picker.delegate = self;
   [self presentModalViewController:picker animated:YES];

}


- (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingImage:(UIImage *)image editingInfo:(NSDictionary *)editingInfo{
   UIImage *myImage =image;
}

pickImage meth调用模拟器崩溃并在终端显示消息时如下:

2012-09-08 18:53:50.953 NewExample[4645:207] UIStatusBarStyleBlackTranslucent is not available on this device.

任何想法? 在此先感谢。

3 个答案:

答案 0 :(得分:1)

答案 1 :(得分:0)

检查此链接ipad图像选择器中的How to use UIImagePickerController in iPad?应使用uipopover控制器显示。

答案 2 :(得分:0)

我的理解是你无法从模拟器中呈现图像选择器。验证相机是否可用于设备和当前图像选择器视图。

相关问题