captured image not showing in uiimageView
I have a uibutton to trigger an iphone's camera to grab an image, and I have a uiimageView in same view to show captured image, but it not showing anything after capturing.
Any solution开发者_StackOverflow社区?
here's my code:
- (IBAction)grabImage:(id)sender{
UIImagePickerController *picker = [[UIImagePickerController alloc] init];
picker.delegate = self;
picker.allowsImageEditing = YES;
picker.sourceType = UIImagePickerControllerSourceTypeCamera;
[self presentModalViewController: picker animated:YES];
[picker release];
}
-(void)imagePickerController:(UIImagePickerController *)picker didFinishPickingImage : (UIImage *)image editingInfo:(NSDictionary *)editingInfo { cameraImageView.image = image; [picker dismissModalViewControllerAnimated:YES];
}
精彩评论