Guest User

Untitled

a guest
Nov 19th, 2018
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.93 KB | None | 0 0
  1. //////////////
  2. //////////////
  3. // func checkPermission() {
  4. // let photoAuthorizationStatus = PHPhotoLibrary.authorizationStatus()
  5. // switch photoAuthorizationStatus {
  6. // case .authorized:
  7. // print("Access is granted by user")
  8. // case .notDetermined:
  9. // PHPhotoLibrary.requestAuthorization({
  10. // (newStatus) in
  11. // print("status is \(newStatus)")
  12. // if newStatus == PHAuthorizationStatus.authorized {
  13. // /* do stuff here */
  14. // print("success")
  15. // }
  16. // })
  17. // print("It is not determined until now")
  18. // case .restricted:
  19. // // same same
  20. // print("User do not have access to photo album.")
  21. // case .denied:
  22. // // same same
  23. // print("User has denied the permission.")
  24. // }
  25. // }
  26. //////////////
  27. //////////////
Add Comment
Please, Sign In to add comment