     deinit {
         eventClosures.removeAll()
         KeyboardEventType.allEventNames().forEach {
-            NotificationCenter.default.removeObserver(self, name: NSNotification.Name(rawValue: $0), object: nil)
+            NotificationCenter.default.removeObserver(self, name: $0, object: nil)
         }
     }
     
     public init() {
         KeyboardEventType.allEventNames().forEach {
-            NotificationCenter.default.addObserver(self, selector: #selector(notified(_:)), name: NSNotification.Name(rawValue: $0), object: nil)
+            NotificationCenter.default.addObserver(self, selector: #selector(notified(_:)), name: $0, object: nil)
         }
     }
     

        }
    }
    
    static func allEventNames() -> [String] {
        return [
            KeyboardEventType.willShow,
            KeyboardEventType.didShow,

    case willChangeFrame
    case didChangeFrame
    
    public var notificationName: NSNotification.Name {
        switch self {
        case .willShow:
            return .UIKeyboardWillShow
        case .didShow:
            return .UIKeyboardDidShow
        case .willHide:
            return .UIKeyboardWillHide
        case .didHide:
            return .UIKeyboardDidHide
        case .willChangeFrame:
            return .UIKeyboardWillChangeFrame
        case .didChangeFrame:
            return .UIKeyboardDidChangeFrame
        }
    }
    
