在没有用户交互的情况下从相机拍摄图像?

发布于 2024-08-05 14:24:35 字数 247 浏览 1 评论 0原文

我正在创建一个应用程序,其中一旦 UIImagePickerController 加载(即相机视图),它应该开始拍照而无需任何单击并将图像存储在数组中。如何在不点击“拍摄”按钮的情况下做到这一点?

在参考库中,UIImagePickerController包含一个实例方法-takePicture。有人可以告诉我如果我通过计时器调用这个函数是否可以解决问题?

提前致谢。

I am creating an app in which, as soon as the UIImagePickerController loads (i.e. the camera view), it should start taking pictures without any click and store images in an array. How can I do this without clicking on the "shoot" button?

In reference library, UIImagePickerController contains an instance method, -takePicture. Can somebody tell me if this function will do the trick, if I call it through timer?

Thanks in advance.

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

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

发布评论

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

评论(1

单身狗的梦 2024-08-12 14:24:35

-takePicture 应该确实能达到目的。您必须为相机控件提供自定义 UI,因为否则(对我来说)它不起作用。查看 Xcode 中的开发人员文档并搜索 takePicture。方法描述包含您需要的一切。

-takePicture should do the trick in deed. You have to provider a custom UI for the camera controls, because otherwise (for me) it doesn't work. Check out the developer documentation in Xcode and search for takePicture. The method description has everything you need.

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