Created
September 15, 2017 15:54
-
-
Save gali8/2da001a613c96012a65a98d483aa5711 to your computer and use it in GitHub Desktop.
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
@IBAction func camera(_ sender: Any) { | |
let cameraPicker = UIImagePickerController() | |
cameraPicker.delegate = self | |
if cameraMode { | |
cameraPicker.sourceType = .camera | |
cameraPicker.allowsEditing = true | |
cameraPicker.cameraCaptureMode = .photo | |
cameraPicker.cameraDevice = .rear | |
cameraPicker.showsCameraControls = true | |
} | |
present(cameraPicker, animated: true) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment