Aab*_*nde 18 photo uiimagepickercontroller ios7
在这里,我正在使用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];
}
}
Run Code Online (Sandbox Code Playgroud)
aks*_*h1t 10
UIImagePickerControllerSourceTypeCameraiOS提供的库存有这两个按钮.
达到你想要的东西的一种方法是继续使用UIImagePickerViewController和设置showsCameraControls来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;
Run Code Online (Sandbox Code Playgroud)
另一种方法是使用AVFoundation创建自己的相机视图.
| 归档时间: |
|
| 查看次数: |
7604 次 |
| 最近记录: |