Iphone UIImagePicker未显示OS 3.1.2中照片库中的原始图像
天哪!真正地我对这个问题感到沮丧,因为这个问题让我在一周的时间里都在使用我的应用程序 这是密码Iphone UIImagePicker未显示OS 3.1.2中照片库中的原始图像,iphone,objective-c,image,uiimagepickercontroller,Iphone,Objective C,Image,Uiimagepickercontroller,天哪!真正地我对这个问题感到沮丧,因为这个问题让我在一周的时间里都在使用我的应用程序 这是密码 - (IBAction)loadTheImage { UIImagePickerController * picker = [[UIImagePickerController alloc] init]; picker.delegate = self; picker.sourceType = UIImagePickerControllerSourceTypePhotoLibrary;
- (IBAction)loadTheImage {
UIImagePickerController * picker = [[UIImagePickerController alloc] init];
picker.delegate = self;
picker.sourceType = UIImagePickerControllerSourceTypePhotoLibrary;
// picker.sourceType = UIImagePickerControllerSourceTypeSavedPhotosAlbum;
[self presentModalViewController:picker animated:YES];
}
- (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info {
[picker dismissModalViewControllerAnimated:YES];
imageView.image = [info objectForKey:UIImagePickerControllerOriginalImage];
}
如果我将源设置为SavedPhotosAlbum相机滚动,那么它工作正常。但当我将其设置为PhotoLibrary时,它只返回零。而这只发生在OS3.1.2中。在OS4中,它可以正常工作,即返回原始图像
任何人?并非每个设备上都可以使用给定的源。这可能是因为源不存在或当前无法访问
在尝试使用UIImagePickerController对象拾取图像之前,必须调用[UIImagePickerController isSourceTypeAvailable:]方法以确保所需的源类型可用。什么是零?它只是原始图像的值还是整个用户信息字典的值?选择器值是否为零?