i'm loading photos from my library just fine, but photos coming from he camera don't display in the imageView. I've set allowsImageEditing = YES. I've also used CFShow(info) and the data from the camera is not nil...
- (voi开发者_如何学God)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info
{
UIImage *image = [info objectForKey:@"UIImagePickerControllerEditedImage"];
[self.imageView setImage:image];
[self dismissModalViewControllerAnimated:YES];
[picker release];
}
Did you turn on the allowsEditing property of the UIImagePicker? If not, it's not going to return you an editedImage. You'll probably want:
UIImagePickerControllerOriginalImage
I know this is many months later, but I struggled with the same problem and found that though it was asked here many times, it was never answered. Well, I'm happy to say that I figured it out and so am posting it on a few of the nearly-identical questions that come up first on a search.
I posted the full answer here:
didFinishPickingMediaWithInfo return nil photo
精彩评论