Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hashaam/f9e95be473f17d0c3b8927b8c428bb3d to your computer and use it in GitHub Desktop.
Save hashaam/f9e95be473f17d0c3b8927b8c428bb3d to your computer and use it in GitHub Desktop.
// Youtube: https://www.youtube.com/watch?v=7AlZxClmhPw
// Source: https://hashaam.com/2020/07/30/creating-camera-application-with-avfoundation/
func requestCameraAuthorization() {
RequestCameraAuthorizationController.requestCameraAuthorization(completionHandler: { status in
switch status {
case .granted:
print("granted")
case .notRequested:
break
case .unauthorized:
print("unauthorized")
}
})
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment