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.
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 pro开发者_运维问答bably 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..
精彩评论