     
     //MARK: - notification
     private func addNotification() {
-        NSNotificationCenter.defaultCenter().addObserver(self, selector: #selector(XBKeyboardManager.showKeyboard), name: UIKeyboardWillShowNotification, object: nil)
-        NSNotificationCenter.defaultCenter().addObserver(self, selector: #selector(XBKeyboardManager.hideKeyboard), name: UIKeyboardWillHideNotification, object: nil)
+        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)
-    }
-    
-    @objc private func showKeyboard(notification: NSNotification) {
+        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}

    private var contentInsetBottoms = [CGFloat]()
    private var targetInputViewPoint = [CGPoint]()
    
    /**
     适用于所有的输入视图(textField、textview)都在ViewController的view中
     

        targetInputViewPoint.removeAll()
    }
    
    @objc private func didHideKeyboard(notification: NSNotification) {
        isKeyboardWillHide = false
    }
    
    //MARK: - private utils methods
    
