Skip to content

Instantly share code, notes, and snippets.

@gali8
Created September 15, 2017 15:54
Show Gist options
  • Save gali8/2da001a613c96012a65a98d483aa5711 to your computer and use it in GitHub Desktop.
Save gali8/2da001a613c96012a65a98d483aa5711 to your computer and use it in GitHub Desktop.
@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