UIImagePickerController - 避免“预览”屏幕

发布于 2024-09-09 23:22:42 字数 630 浏览 2 评论 0原文

当我使用 UIImagePickerController 拍照时,拍照后它总是将我带到预览屏幕,其中显示“重新拍摄”或“使用”。有什么办法可以避免进入这个屏幕吗?即使当我使用自定义覆盖屏幕并将 picker.allowsEditing 设置为 FALSE 时,它仍然会将我带到此屏幕。我见过其他应用程序避免进入预览屏幕,那么我该怎么做呢?

这是我正在使用的代码:

FrontOverlayView *overlay = [[FrontOverlayView alloc] initWithFrame:CGRectMake(0,0,320,460)];
UIImagePickerController *picker = [[UIImagePickerController alloc] init];
picker.sourceType = UIImagePickerControllerSourceTypeCamera;
picker.delegate = self;
picker.allowsEditing = NO;
picker.cameraOverlayView = overlay;
[self presentModalViewController:picker animated:YES];
[picker release];
[overlay release];

When I use the UIImagePickerController to take a picture, after taking the picture it always takes me to a Preview screen where it says "Retake" or "Use". Is there any way to avoid going to this screen? Even when I use a custom overlay screen, and I set the picker.allowsEditing to FALSE, it still takes me to this screen. I've seen other apps which avoid going to the preview screen, so how would I do it?

This is the code I'm using:

FrontOverlayView *overlay = [[FrontOverlayView alloc] initWithFrame:CGRectMake(0,0,320,460)];
UIImagePickerController *picker = [[UIImagePickerController alloc] init];
picker.sourceType = UIImagePickerControllerSourceTypeCamera;
picker.delegate = self;
picker.allowsEditing = NO;
picker.cameraOverlayView = overlay;
[self presentModalViewController:picker animated:YES];
[picker release];
[overlay release];

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

末蓝 2024-09-16 23:22:43
picker.showsCameraControls = NO;

应该这样做。

picker.showsCameraControls = NO;

should do it.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文