在没有用户交互的情况下从相机拍摄图像?
我正在创建一个应用程序,其中一旦 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
-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.