         }
     }
     public static var keyboardAvoidingMode = KeyboardAvoidingMode.minimum
-    public static var avoidingBlock: ((Bool, CGFloat, CGFloat, UIViewAnimationOptions)->Void)? {
+    @objc public static var avoidingBlock: ((Bool, CGFloat, CGFloat, UIViewAnimationOptions)->Void)? {
         willSet {
             self.initialise()
         }

    private static var lastNotification: Foundation.Notification?
    private static var updatedConstraints = [NSLayoutConstraint]()
    private static var updatedConstraintConstants = [CGFloat]()
    private(set) static var isKeyboardVisible = false
    private static var avoidingViewUsesAutoLayout = false
    private static var triggerViews = [UIView]()
    private static var showingAnimationCount = 0
    
    public static var buffer: CGFloat = 0.0
    public static var paddingForCurrentAvoidingView: CGFloat = 0.0
    public static var padding: CGFloat = 0.0 {
        willSet {
            if self.paddingForCurrentAvoidingView == newValue {
                // if paddingCurrent has been set explicitly, dont reset it

        // hack for bug in iOS 11.2
        let keyboardFrameEnd = notification.userInfo![UIKeyboardFrameEndUserInfoKey] as! CGRect
        keyboardFrameBegin = CGRect(x: keyboardFrameBegin.origin.x, y: keyboardFrameBegin.origin.y, width: keyboardFrameBegin.size.width, height: keyboardFrameEnd.size.height)
        
        var keyboardHeightDiff:CGFloat = 0.0
        if keyboardFrameBegin.size.height > 0 {
            keyboardHeightDiff = keyboardFrameBegin.size.height - keyboardFrame.size.height
