I have a custom camera and I would like the user to take a picture in side of a view. For example, Snapchat has it where the user can take a picture inside of that QR code. What I want to do is the same thing. How do I go about this? Do I photoshop a png? Do I do this programmatically?
2
Answers
Import a png file into your project which will be the overlay for your camera view. Then, on your camera view, set the
cameraOverlayView
property to the image file you imported like so:To use camera overlay view with custom designed UI (XIB or Storyboard)
first set imagePicker
Comment this if you wanna use default controllers
Then I created an UIView subclass to handle overlayview controlle
or you can use AVFoundation and create fully customized camera view. This method you can design it any way you like with out limitation of picker controller.
check https://developer.apple.com/library/ios/samplecode/AVCam/Introduction/Intro.html
this is in Objective C but can directly convert it to Swift easily.