Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //////////////
- //////////////
- // func checkPermission() {
- // let photoAuthorizationStatus = PHPhotoLibrary.authorizationStatus()
- // switch photoAuthorizationStatus {
- // case .authorized:
- // print("Access is granted by user")
- // case .notDetermined:
- // PHPhotoLibrary.requestAuthorization({
- // (newStatus) in
- // print("status is \(newStatus)")
- // if newStatus == PHAuthorizationStatus.authorized {
- // /* do stuff here */
- // print("success")
- // }
- // })
- // print("It is not determined until now")
- // case .restricted:
- // // same same
- // print("User do not have access to photo album.")
- // case .denied:
- // // same same
- // print("User has denied the permission.")
- // }
- // }
- //////////////
- //////////////
Add Comment
Please, Sign In to add comment