         }
     }
     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()
         }

        // 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

    }
    
    // The triggerView is required if the avoidingView isn't nil
    @objc public class func setAvoidingView(_ avoidingView: UIView?, withTriggerView triggerView: UIView) {
        self.setAvoidingView(avoidingView, withOptionalTriggerView: triggerView)
    }
    
