                 }
             }
 
-            PHPhotoLibrary.requestAuthorization { status in
-
-                switch status {
-
-                case .Authorized:
-                    openCameraRoll()
-
-                default:
-                    self?.alertCanNotAccessCameraRoll()
-                }
-            }
+            proposeToAccess(.Photos, agreed: openCameraRoll, rejected: {
+                self?.alertCanNotAccessCameraRoll()
+            })
         }
 
         takePhotoButton.title = NSLocalizedString("Take photo", comment: "")
         takePhotoButton.tapAction = { [weak self] in
 
-            let openCamera: () -> Void = { [weak self] in
+            let openCamera: ProposerAction = { [weak self] in
                 if UIImagePickerController.isSourceTypeAvailable(UIImagePickerControllerSourceType.Camera) {
                     let imagePicker = UIImagePickerController()
                     imagePicker.delegate = self

        choosePhotoButton.title = NSLocalizedString("Choose photo", comment: "")
        choosePhotoButton.tapAction = { [weak self] in

            let openCameraRoll: () -> Void = { [weak self] in
                if UIImagePickerController.isSourceTypeAvailable(UIImagePickerControllerSourceType.PhotoLibrary){
                    let imagePicker = UIImagePickerController()
                    imagePicker.delegate = self

import AVFoundation
import MobileCoreServices
import MapKit
import Proposer

struct MessageNotification {
    static let MessageStateChanged = "MessageStateChangedNotification"
