 import Foundation
 
 public class XBKeyboardManager {
+    //MARK: private property
     private var inputViews = [UIView]()
     private var commonScrollView: UIScrollView?
     private weak var viewController: UIViewController? { return getViewContoller() }

        }
    }
    
    @objc private func hideKeyboard(notification: NSNotification) {
        guard let userInfo = notification.userInfo else {return}
        let animationInfos = getKeyboardAnimationInfos(userInfo)
        UIView.animateWithDuration(animationInfos.duration,

    
    //MARK: - notification
    private func addNotification() {
        NSNotificationCenter.defaultCenter().addObserver(self, selector: #selector(XBKeyboardManager.willShowKeyboard), name: UIKeyboardWillShowNotification, object: nil)
        NSNotificationCenter.defaultCenter().addObserver(self, selector: #selector(XBKeyboardManager.didShowKeyboard), name: UIKeyboardDidShowNotification, object: nil)
        NSNotificationCenter.defaultCenter().addObserver(self, selector: #selector(XBKeyboardManager.willHideKeyboard), name: UIKeyboardWillHideNotification, object: nil)
        NSNotificationCenter.defaultCenter().addObserver(self, selector: #selector(XBKeyboardManager.didHideKeyboard), name: UIKeyboardDidHideNotification, object: nil)
    }
    
    private func removeNotification() {
        NSNotificationCenter.defaultCenter().removeObserver(self, name: UIKeyboardWillShowNotification, object: nil)
        NSNotificationCenter.defaultCenter().removeObserver(self, name: UIKeyboardDidShowNotification, object: nil)
        NSNotificationCenter.defaultCenter().removeObserver(self, name: UIKeyboardWillHideNotification, object: nil)
        NSNotificationCenter.defaultCenter().removeObserver(self, name: UIKeyboardDidHideNotification, object: nil)
    }
    
    @objc private func willShowKeyboard(notification: NSNotification) {
        isKeyboardWillShow = true
        
        guard let userInfo = notification.userInfo else {return}
        //键盘的frame数据
        guard let rect = (userInfo[UIKeyboardFrameEndUserInfoKey] as? NSValue)?.CGRectValue() else {return}
