             }
         }
 
-        PHPhotoLibrary.requestAuthorization { status in
-
-            switch status {
-
-            case .Authorized:
-                openCameraRoll()
-
-            default:
-                self.alertCanNotAccessCameraRoll()
-            }
-        }
+        proposeToAccess(.Photos, agreed: openCameraRoll, rejected: {
+            self.alertCanNotAccessCameraRoll()
+        })
     }
 
     func uploadAvatarAndGotoPickSkills() {

    }

    @IBAction func tryOpenCamera(sender: UIButton) {

        AVCaptureDevice.requestAccessForMediaType(mediaType, completionHandler: { (granted) -> Void in
            if granted {
                self.openCamera()

            } else {
                self.alertCanNotOpenCamera()
            }
        })
    }



import UIKit
import AVFoundation
import Proposer

class RegisterPickAvatarViewController: UIViewController {
    
