         let nc = NotificationCenter.default
         nc.addObserver(self, selector: #selector(keyboardWillShow), name: .UIKeyboardWillShow, object: nil)
         nc.addObserver(self, selector: #selector(keyboardWillHide), name: .UIKeyboardWillHide, object: nil)
-        nc.addObserver(self, selector: #selector(keyboardDidShow), name: .UIKeyboardDidShow, object: nil)
     }
 
 

        }

        refreshInsets(forKeyboardFrame: keyboardFrame)
    }

    func keyboardDidShow(_ notification: Notification) {
        guard richTextView.isFirstResponder, !formatBarAnimatedPeek else {
            return
        }

        let formatBar = richTextView.inputAccessoryView as? FormatBar
        formatBar?.animateSlightPeekWhenOverflows()
        formatBarAnimatedPeek = true
    }

    fileprivate func refreshInsets(forKeyboardFrame keyboardFrame: CGRect) {

        let nc = NotificationCenter.default
        nc.removeObserver(self, name: .UIKeyboardWillShow, object: nil)
        nc.removeObserver(self, name: .UIKeyboardWillHide, object: nil)
    }


