     
     func locationManager(manager: CLLocationManager!, didChangeAuthorizationStatus status: CLAuthorizationStatus) {
         if status != .Denied {
-            tempBlock?(.JustAuthorized)
+            completionBlock?(.JustAuthorized)
         } else {
-            tempBlock?(.Denied)
-        }
-    }
-    
-}
+            completionBlock?(.Denied)
+        }
+    }
+    
+}



class Permission: NSObject {
    
    let type : PermissionType
    let title : String
    var button: UIButton?
    var imageView: UIImageView?
//    var key: String { return type.key() }
    
    init(type: PermissionType, title: String) {
        self.type = type

            NSUserDefaults.standardUserDefaults().setBool(true, forKey: "requestedInUseToAlwaysUpgrade")
            NSUserDefaults.standardUserDefaults().synchronize()
        }
        completionBlock = completion
        locationManager?.delegate = self
        locationManager?.requestAlwaysAuthorization()
    }
