SnapChat-Like Camera! (Part 2 : Swift in Xcode)
Why Stack Overflow recommends it
Stack Overflow users link it as a reference tutorial when building or updating a Snapchat-like custom camera in Swift, including questions about moving it to Swift 3 and iOS 10.
Recommended by 0 people across 0 different months, 2016 to 2017.
What it is
Part 2 of a Swift tutorial series by Jared Davidson that builds a Snapchat-style custom camera in Xcode using AVFoundation. This installment covers capturing a photo and showing it, with project files on GitHub. The description warns that it was written for Swift 2 and some syntax has since changed.
What people said
Cites Manu · 2016-06 · Stack Overflow · on “Snapchat like camera”
Right now, I am making a snapchat like application, I made a custom camera following this tutorial [LINK] , then on the next video [this video] he explains how to take pictures. My problem is that he takes the picture touching the screen and I want to take a picture with a button, right now the .xib looks like this: [LINK] First, I had this issue: func didPressTakeAnother(){ if didTakePhoto == true{ tempImageView.hidden = true didTakePhoto = false } else{ captureSession?.startRunning() didTakePhoto = true didPressTakePhoto() } because I added a button I changed the func didPressTakePhoto so ii had this popping an error. [LINK] After that, I wanted to test it out, so I commented that piece of code
Cites Andrew Saxionis · 2017-01 · Stack Overflow · on “Depreciated Code from Swift 2 to Swift 3”
So I followed this tutorial on youtube: [this video] , and I can't figure out how to update the rest to Swift 3; I am relatively new at Swift and still learning, if anyone could help me out a bit that would be fantastic! I am trying to re-create a snapchat camera-view. import UIKit import AVFoundation class CameraVC: UIViewController, UIImagePickerControllerDelegate, UINavigationControllerDelegate { var captureSession : AVCaptureSession? var stillImageOutput : AVCaptureStillImageOutput? var previewLayer : AVCaptureVideoPreviewLayer? @IBOutlet var cameraView: UIView! override func viewDidLoad() { super.viewDidLoad() // Do any additional setup after loading the view. } override func didReceiveMemor
Cites User 5842 · 2017-03 · Stack Overflow · on “Using AVCapturePhotoOutput in iOS10 - NSGenericException”
For anyone else that may be trying to figure this out, the following resources helped me: For reference and code layout SnapChat: Camera 1 [LINK] SnapChat: Camera 2 [this video] Actual implementation and usage of new iOS10 Camera features AV Foundation: iOS 10 [LINK] iOS Custom Camera [LINK]