I've been trying to figure out how to embed a small(ish) live camera view inside of an iPhone's UIView
to no avail.
I have not even been able to find any samples of that on the net either. I know that it's do-able, but I don't even know where to start. There seem to be a lot of examples where others have added views TO the full-blown screen view of the camera, but not the other way around...
It seems that UIImagePickerControllerSourceTypeCamera
just displays the BIG modal camera
viewer, picture taker, so it is unsuitable (I think) for my purposes.
I want to have a small live camera view, inside a UIView
, and I can add my own buttons
for taking the pic (I can probably figure this out - a delegate of some sort to capture
the image)
Thank you...
For your purpose you need to use AVFoundation, specifically look at AVCaptureSession
, AVCaptureDeviceInput
, which you can use in order to get access to the cameras and look into AVCaptureVideoPreviewLayer
which will allow you to draw the camera input to the screen, everything you need is in there..
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With