开发者

captured image not showing in uiimageView

开发者 https://www.devze.com 2023-01-22 05:06 出处:网络
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.

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];

}

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号