Ios7 如何在IOS 7中通过相机拍摄图像后跳过重新拍摄/使用照片选项

Ios7 如何在IOS 7中通过相机拍摄图像后跳过重新拍摄/使用照片选项,ios7,uiimagepickercontroller,photo,Ios7,Uiimagepickercontroller,Photo,在这里,我正在开发一个使用IOS 7的应用程序,其中的摄像头用于捕捉图像。但在拍摄图像后,它会显示“重新拍摄/使用照片”选项。我想在捕获图像后直接转到下一个屏幕而不显示默认的重拍?使用照片选项。我用谷歌搜索出这个问题,但我没有得到正确的解决方案。请帮我解决这个问题 提前谢谢 下面是我在项目中使用的代码片段 -(void)StartCamera { if (![UIImagePickerController isSourceTypeAvailable:UIImagePickerControll

在这里,我正在开发一个使用IOS 7的应用程序,其中的摄像头用于捕捉图像。但在拍摄图像后,它会显示“重新拍摄/使用照片”选项。我想在捕获图像后直接转到下一个屏幕而不显示默认的重拍?使用照片选项。我用谷歌搜索出这个问题,但我没有得到正确的解决方案。请帮我解决这个问题

提前谢谢

下面是我在项目中使用的代码片段

-(void)StartCamera

{

if (![UIImagePickerController isSourceTypeAvailable:UIImagePickerControllerSourceTypeCamera])

{  

  UIAlertView *myAlertView = [[UIAlertView alloc] initWithTitle:@"Error"           message:@"Device has no camera" delegate:nil cancelButtonTitle:@"OK" otherButtonTitles: nil];

    [myAlertView show];
}
else
{ 
    picker = [[UIImagePickerController alloc] init];
    picker.delegate = self;
    picker.allowsEditing = NO;
    picker.sourceType = UIImagePickerControllerSourceTypeCamera;
    [self presentViewController:picker animated:YES completion:NULL];
}
}


iOS提供的stock
UIImagePickerControllerSourceTypeCamera
具有这两个按钮

实现所需功能的一种方法是继续使用
UIImagePickerViewController
,并将
ShowScameraControl
设置为
NO
。然后,使用自定义覆盖视图的
cameraOverlayView
提供您自己的用户界面

self.picker.showsCameraControls = NO;

self.overlay = [[OverlayViewController alloc] initWithNibName:@"Overlay" bundle:nil];
self.overlay.pickerReference = self.picker;

self.picker.cameraOverlayView = self.overlay.view;
self.picker.delegate = self.overlay;
另一种方法是使用
AVFoundation
创建自己的相机视图

    let picker = UIImagePickerController()
        picker.delegate = self
        picker.allowsEditing = false
        picker.automaticallyAdjustsScrollViewInsets = true
        picker.sourceType = UIImagePickerControllerSourceType.camera
适用于相机和画廊


如果您使用任何第三方库进行编辑,它将直接引导您到该库,或在不提供预览的情况下关闭选择器控制器。

Cool!另外,看看苹果的这个例子:下面是AVFoundation的代码。希望能有帮助。允许设置为否(错误)的相机不这样做对我来说。我仍然得到了重拍/使用照片controls@ChrisPrince我在回答中做了一些更改,以帮助您解决问题。谢谢这个答案是不正确的。如图所示设置选项对iOS显示的使用/重新获取UI没有影响。这不是.allowsEditing选项所做的。