简体   繁体   English

使用相机作为uiview iPhone的叠加层

[英]Use camera as overlay for uiview iPhone

I was wondering if it was possible to make the camera feed appear in a custom screen. 我想知道是否可以让相机进纸显示在自定义屏幕中。 Basically I have a uiview that I want the camera feed to appear in. I would then have custom buttons on the screen and stuff like that to take pictures and then email out the pictures. 基本上我有一个uiview,我希望相机输入显示。然后我会在屏幕上有自定义按钮和类似的东西拍照,然后通过电子邮件发送图片。

Is there an easy way to do this, that will not get rejected upon app review? 有没有一种简单的方法可以做到这一点,在应用程序审核时不会被拒绝? I have read before about using UIImagePicker and using cameraOverlayView, but I could not get that to work. 我之前已经阅读过关于使用UIImagePicker和使用cameraOverlayView的内容,但我无法使用它。

Sample code is greatly appreciated. 非常感谢示例代码。 Thanks in advance for your help! 在此先感谢您的帮助!

是的,您可以使用AVFoundation框架中的AVCaptureVideoPreviewLayer

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM