我有一个uibutton触发iphone相机抓取图像,我在同一视图中有一个uiimageView来显示捕获的图像,但是在捕获后它没有显示任何内容。
任何解决方案?
答案 0 :(得分:0)
这是我的代码:
UIImagePickerController *picker = [[UIImagePickerController alloc] init];
picker.delegate = self;
picker.allowsImageEditing = YES;
picker.sourceType = UIImagePickerControllerSourceTypeCamera;
[self presentModalViewController: picker animated:YES];
[picker release];
}
- (void)imagePickerController:(UIImagePickerController *)选取器 didFinishPickingImage :( UIImage *)图片 editingInfo:(NSDictionary *)editingInfo { cameraImageView.image = image; [picker dismissModalViewControllerAnimated:YES];
}