我在使用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];
}
}