iPhone SDK - 如何禁用 UIImagePickerController 中的图片预览?
有没有办法在使用 UIImagePickerController 拍照后禁用图像预览?我想在用户按下快门释放按钮后立即关闭 ImagePicker。
Is there any way to disable the image preview after taking a picture with the UIImagePickerController? I want to dismiss the ImagePicker as soon as the user pressed the shutter release button.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我在此处提出了类似的问题,
我的解决方案是在顶部创建一个自定义视图默认 UIImagePickerControllerView 的。
我下载了示例 增强现实
然后您可以使用 OverlayView.m和 OverlayView.h 将它们添加到您的项目中:
我将自定义选取器工具栏、选取器和overlayView设为全局,以便我可以在项目中的任何位置访问它们。
在 ViewController.h 中,
我创建了工具栏的控件、相机按钮和取消按钮
取消方法
(shootPictureMethod):
要退出而不显示预览,只需在 didFinishPickingImage 方法中拍照后关闭视图
I asked a similar question here
My solution was to create a customized view on top of the default UIImagePickerControllerView.
I downloaded the example Augmented Reality
Then you can use the OverlayView.m and OverlayView.h by adding them to your project:
I made the custom picker toolbar, picker and overlayView global so that I can access them anywhere in the project.
In your ViewController.h
I created the controls of the toolbar a camera button and the cancel button
The cancel method
The (shootPictureMethod):
To exit without showing preview just dismiss the view after taking the picture in the didFinishPickingImage method
这是快速版本:
Here's the swift version: