本文介绍了设置背景图像/视图以实况相机视图?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以为特定视图控制器设置背景以显示实时相机视图?

Is it possible to set a background for a particular view controller to show a live camera view? If so, could one lead me in the right direction to make this possible?

推荐答案

是的,绝对可能。你可以在UIView嵌入实时相机Feed,你可以放置在任何你喜欢的地方。

Yes, definitely possible. You can embed live camera feed in UIView, which you can place anywhere you like.

开始阅读: - 这是你的框架

Start by reading here: AVFoundation Reference - this is your framework

你正在寻找的特定类是

Particular class that you are looking for is AVCaptureVideoPreviewLayer

这是一个涵盖所有需要的示例项目:

And this is an example project that covers everything you need: AVCam

这篇关于设置背景图像/视图以实况相机视图?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-02 12:25