如何在从相机捕获照片后跳过“重新拍摄和使用”选项 [英] How to skip 'retake and use' option after captureing photo from camera
本文介绍了如何在从相机捕获照片后跳过“重新拍摄和使用”选项的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何
我们使用了以下代码
self.gimgPicker = [[GKImagePicker alloc] init];
self.gimgPicker.cropSize = CGSizeMake(310,310);
self.gimgPicker.delegate = self;
self.gimgPicker.desiredSize = CGSizeMake(640,640);
imgPicker = [[UIImagePickerController alloc] init];
//如果选择了索引处的按钮,将类型设置为照片库
if([UIImagePickerController isSourceTypeAvailable:UIImagePickerControllerSourceTypeCamera]){
self.gimgPicker.imagePickerController.sourceType = UIImagePickerControllerSourceTypeCamera;
[parentController presentModalViewController:self.gimgPicker.imagePickerController animated:YES];
}
解决方案
作者: showsCameraControls 属性 UIImagePickerController
类
如果将其设置为
您的选择是使用 AVFoundation ,这将给你在它的外观和表现的充分的灵活性。虽然设置需要更多的时间,但是从长远来看,它会得到回报。
How to skip 'retake and use' option after captureing photo from camera or how to change font and color of these buttons.
We have used following code
self.gimgPicker = [[GKImagePicker alloc] init];
self.gimgPicker.cropSize = CGSizeMake(310, 310);
self.gimgPicker.delegate = self;
self.gimgPicker.desiredSize = CGSizeMake(640, 640);
imgPicker = [[UIImagePickerController alloc] init];
// Set type to Photo Library if button at index is selected
if ([UIImagePickerController isSourceTypeAvailable: UIImagePickerControllerSourceTypeCamera]) {
self.gimgPicker.imagePickerController.sourceType = UIImagePickerControllerSourceTypeCamera;
[parentController presentModalViewController:self.gimgPicker.imagePickerController animated:YES];
}
解决方案 this view is brought to you by showsCameraControls property of UIImagePickerController
class
If you set it to NO
you won't see that screen, but you will have to provide camera controls.
Your alternative is to use AVFoundation which will give you full flexibility on how it looks and performs. Although it will take a bit more time to setup, it will pay-off in the long run.
这篇关于如何在从相机捕获照片后跳过“重新拍摄和使用”选项的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文