Created
November 7, 2016 19:46
-
-
Save nickmeehan/631e9c1fab4435b1ec45f893145330ad to your computer and use it in GitHub Desktop.
AVFoundation - viewDidLoad
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
override func viewDidLoad() { | |
super.viewDidLoad() | |
let deviceTypes: [AVCaptureDeviceType] = [.builtInDuoCamera, .builtInTelephotoCamera, .builtInWideAngleCamera] | |
let devices = AVCaptureDeviceDiscoverySession(deviceTypes: deviceTypes, mediaType: AVMediaTypeVideo, position: .back).devices | |
if let device = devices?.first { | |
self.captureDevice = device | |
beginSession() | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment