Jaun7707
Jaun7707

Reputation: 119

How do I display the back camera live video feed to an UIImageView?

I have been messing around with the AVFoundation framework for iPhone, but I can't seem to be able to get the information from the back video camera to display on an UIImageView I have in interface builder.

This is a single view application.

I just want to get what the back camera sees displayed on an UIImageView.

Thank you!

Upvotes: 0

Views: 3107

Answers (2)

Dos43
Dos43

Reputation: 128

You don't need a UIImageView, just a UIView.

Take a look at AVCaptureSession and AVCaptureDeviceInput in AVFoundation. With these you can access the cameras.

AVCaptureVideoPreviewLayer can be used to draw the camera input to a UIView.

http://developer.apple.com/library/ios/#documentation/AVFoundation/Reference/AVCaptureVideoPreviewLayer_Class/Reference/Reference.html

Upvotes: 4

futurevilla216
futurevilla216

Reputation: 992

Hopefully this answers your question: http://www.ios-developer.net/iphone-ipad-programmer/development/camera/camera-preview-on-a-view-controller

Please let me know if you would like any more information!

Upvotes: 0

Related Questions