如何在主窗口中实时显示摄像机视图?
我正在尝试制作一个具有路点结构的增强现实应用程序,例如 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
来自文档:
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.