如何在主窗口中实时显示摄像机视图?

发布于 2024-09-04 23:50:24 字数 153 浏览 2 评论 0原文

我正在尝试制作一个具有路点结构的增强现实应用程序,例如 Yelp,并且我想知道如何设置我的主视图,以便它在整个屏幕上显示相机视图。我听说过使用 UIImagePickerController 类,但我不确定如何操作代码,以便它实际上不会拍照,而只是停留在视图模式下。任何帮助将不胜感激,谢谢!

I'm trying to make an augmented reality application with a waypoint structure, like Yelp, and I'm wondering how to set up my main view so that it displays the camera view on the whole screen. I've heard of using the UIImagePickerController Class, but I'm unsure how to manipulate the code so that it doesn't actually take a picture, but just stays in the view mode. Any help would be appreciated, thanks!

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

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

发布评论

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

评论(1

似梦非梦 2024-09-11 23:50:24

来自文档:

http://developer. apple.com/iphone/library/documentation/UIKit/Reference/UIImagePickerController_Class/UIImagePickerController/UIImagePickerController.html

您应该能够创建一个 UIImagePickerController 并将 sourceType 设置为 UIImagePickerControllerSourceTypeCamera,然后使用showCameraControls 禁用相机控件。

From the documentation:

http://developer.apple.com/iphone/library/documentation/UIKit/Reference/UIImagePickerController_Class/UIImagePickerController/UIImagePickerController.html

You should just be able to create a UIImagePickerController and set sourceType to UIImagePickerControllerSourceTypeCamera, and then disable the camera controls using showsCameraControls.

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