设置背景图像/视图以实况相机视图? [英] Setting a background image/view to live camera view?

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

问题描述

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

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.

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

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

你正在寻找的特定类是 AVCaptureVideoPreviewLayer

Particular class that you are looking for is AVCaptureVideoPreviewLayer

AVCaptureSession

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

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

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

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