Skip to content
This repository was archived by the owner on May 18, 2021. It is now read-only.

Commit 429e09f

Browse files
author
Yasin
authored
Merge pull request #2 from SwiftOldDriver/master
pull
2 parents e8cbb8d + ed5189e commit 429e09f

File tree

48 files changed

+2484
-5
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+2484
-5
lines changed

Project 04 - SnapChatMenu/Snapchat Menu/CameraViewController.swift

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -62,17 +62,14 @@ class CameraViewController: UIViewController, UIGestureRecognizerDelegate {
6262
}
6363
captureSession.sessionPreset = AVCaptureSessionPreset1920x1080
6464
let captureDevice = AVCaptureDevice.defaultDevice(withMediaType: AVMediaTypeVideo)
65-
var input: AVCaptureDeviceInput!
66-
do {
67-
input = try AVCaptureDeviceInput(device: captureDevice)
68-
} catch {
65+
guard let input = try? AVCaptureDeviceInput(device: captureDevice) else {
6966
return
7067
}
7168
guard captureSession.canAddInput(input) else {
7269
return
7370
}
7471
captureSession.addInput(input)
75-
stillImageOutput.outputSettings = [AVVideoCodecKey: AVVideoCodecJPEG]
72+
stillImageOutput.outputSettings = [AVVideoCodecKey : AVVideoCodecJPEG]
7673
guard captureSession.canAddOutput(stillImageOutput) else {
7774
return
7875
}

Project 06 - MyLocation/.DS_Store

6 KB
Binary file not shown.

0 commit comments

Comments
 (0)