Does anybody know how I can get a live camera feed into an UIImageView
?
I have a custom UI where I need to show the camera feed (front facing camera) so I cannot use the UIImagePickerControl
.
Does anybody know how I can get a live camera feed into an UIImageView
?
I have a custom UI where I need to show the camera feed (front facing camera) so I cannot use the UIImagePickerControl
.
You need to create a capture session, and start it running. Once that's done you can add the layer from the capture session to your view:
Having done that, you can create a preview layer as follows:
And then add the preview layer to your view: