如何以编程方式启动iPad的前置摄像头? [英] How to programmatically start front camera of iPad?

查看:149
本文介绍了如何以编程方式启动iPad的前置摄像头?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在应用程序启动时启动iPad的前置摄像头。

I would like to start front camera of the iPad when app starts.

如何以编程方式执行此操作?

How do I do it programmatically?

请告诉我。

推荐答案

如果我理解你的问题,你所要做的就是打开你的相机要处于前台模式而不是后方模式,所以在第一次调用选择器的方法中写这个:

If I understand your question correctly, all you have to do is open your Camera to be in Front Mode instead of Rear Mode, so write this inside the method where you call the picker for the first time:

picker.cameraDevice = UIImagePickerControllerCameraDeviceFront;

picker.cameraDevice=UIImagePickerControllerCameraDeviceFront;

希望这能回答你的问题。

Hope this answers your question.

这篇关于如何以编程方式启动iPad的前置摄像头?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆