How to put the camera preview into a UIImageView? - ios

I want to put the camera live view (back camera) inside the ViewController in iOS in Swift but I don't know how to do it.

Please, search for answers first and if you do not found then come and ask.
Here I am giving some which I found it here only. you can get more.
How to Add Live Camera Preview to UIView
Take photos with live video preview using AVFoundation

Related

Can imageView display live video? (iOS)

I have an app that can capture a photo, then set it to the iamgeView. now I want my app without capturing the photo, the imageView.image is the whole camera view, can iOS do this?
No, UIImageView cannot display the live camera feed. It sounds like you want to use an AVCaptureVideoPreviewLayer. There are many examples of how to use it available for free on the Internet. Check out Appleā€™s own AVCam sample code for one.

IOS How to get image from IPhone camera scene by programmatically without press shoot button?

I am trying to get image from camera and send it to the server automatically.
So I want to know how to capture image from iphone camera scene without press shoot button.
Please help.
Thanks.
How to save photos taken using AVFoundation to Photo Album?
I use this code and solve problem.
https://developer.apple.com/library/content/samplecode/AVCam/Introduction/Intro.html#//apple_ref/doc/uid/DTS40010112
AV Cam-iOS also can solve my problem.
Thank you everyone.
I don't think it is possible. Capturing image using Camera interface will trigger UIImagePickerControllerDelegate methods. The delegates are only called when you pick an image through camera shutter button/image cropper.

How to add image picker with camera button to iOS app

I'm adding a button that opens a view of the saved images on device, but also has a button to open the camera. The iOS Facebook app currently does this.
I've played with both AVCapture to create my own camera ui and UIImagePickerController to use the default UI but have been unable to find a view that displays both the saved images and camera button.
My question is, did facebook implement their own image picker or is it an Apple included library?
Thanks!
Facebook has their own imagepicker subclass but that doesnt matter for you - just implement a different method for each button that changes the imagepickertype to UIImagePickerControllerSourceTypeCamera or UIImagePickerControllerSourceTypeSavedPhotosAlbum and then displays the picker.
This came across this control AQPhotoPicker. Hopefully it will help you, it's easy to use

Recording custom view with UIImagePickerController

I have a UIImagePickerController that has a custom view displaying over the camera image. All works fine, but when the user records video, I want the items in my view to appear in the video. Instead, all I get is the ray video from the camera.
Is there a way to integrate my view into the recorded video?
_mike
Yes, AVFoundation allows you to do this, there's some great videos in Apple's AVFoundation tutorials, though here's a link to a great tutorial for using this framework.
http://www.raywenderlich.com/30200/avfoundation-tutorial-adding-overlays-and-animations-to-videos
Hope this help.

iOS App: AVFoundation Video camera recording delegates

I am trying to develop an app that records the video using the rear camera.
I want the video to be tweaked (adding overlay image, green screen) before saving it to a file.
I am using AVFoundation, and have researched anywhere, but I still cant make the correct codes to preview and record (without the tweaking)
Some codes that Iget from the internet use BufferDelegate, the rest are using RecordingDelegate.
Do I need to use both to achieve what I want? or is it just one ofthem?
Could you please pinpoint me how I can achieve this?

Resources