我一直在摆弄iPhone的AVFoundation框架,但我似乎无法从后置摄像头获取信息来显示在我的界面构建器中的UIImageView上。
这是一个单视图应用程序。
我只想把后置摄像头看到的画面显示在UIImageView上。
谢谢!
发布于 2013-02-26 10:40:36
你不需要UIImageView,只需要一个UIView。
看看AVFoundation中的AVCaptureSession和AVCaptureDeviceInput。有了这些,你就可以访问摄像头了。
可以使用AVCaptureVideoPreviewLayer将摄像头输入绘制到UIView。
http://developer.apple.com/library/ios/#documentation/AVFoundation/Reference/AVCaptureVideoPreviewLayer_Class/Reference/Reference.html
发布于 2013-02-26 10:39:07
希望这能回答你的问题:http://www.ios-developer.net/iphone-ipad-programmer/development/camera/camera-preview-on-a-view-controller
如果您想了解更多信息,请让我知道!
https://stackoverflow.com/questions/15080349
复制相似问题