     
     
     //MARK: - CLLocationManagerDelegate
-    func locationManager(manager: CLLocationManager, didChangeAuthorizationStatus status: CLAuthorizationStatus) {
+    public func locationManager(manager: CLLocationManager, didChangeAuthorizationStatus status: CLAuthorizationStatus) {
         
         NSNotificationCenter.defaultCenter().postNotificationName("LocalizationAuthorizationStatusChanged", object: manager)
         NSNotificationCenter.defaultCenter().postNotificationName("AuthorizationStatusChanged", object: nil)

import MapKit
import EventKit

//protocol PermissionExplanationProtocol {
//    func explanationDidFinishWithPermissionGranted(permissionGranted : Bool)
//    func showPermissionFailedAlert()
//    
//}

enum PermissionInterestedIn {
    case Location, Calendar, Notification
}
class PermissionController: NSObject, CLLocationManagerDelegate {
//    var delegate : PermissionExplanationProtocol?
    private var locationManager : CLLocationManager?
    private var eventStore : EKEventStore?
    private var currentViewControllerView: UIView?

    
    private var successBlock : (()->())?
    private var failureBlock: (()->())?


/**
Use this method to present the permission view.
The user will be asked to give permissions by a dialog.

When the user already granted a permission, the button is not enabled and a checkmark reflects it.

- returns: Bool that is true, when requested permission is already granted.
If other permissions are missing, the PermissionView will be displayed and false is returned.
    
- parameter viewController: The UIViewController on which the PermissionView shall be presented.
    
