     }
 
     private func commonInit() {
-        NotificationCenter.default.addObserver(self, selector: #selector(ExpandableTextView.textDidChange), name: UITextView.textDidChangeNotification, object: self)
+        self.setupTextDidChangeObserver()
         self.configurePlaceholder()
         self.updatePlaceholderVisibility()
     }

        self.commonInit()
    }

    override public init(frame: CGRect, textContainer: NSTextContainer?) {
        super.init(frame: frame, textContainer: textContainer)
        self.commonInit()

    func expandableTextViewDidHidePlaceholder(_ textView: ExpandableTextView)
}

extension Notification.Name {
    public static let didBecomeFirstResponder = Notification.Name("DidBecomeFirstResponder")
    public static let didResignFirstResponder = Notification.Name("DidResignFirstResponder")
}

open class ExpandableTextView: UITextView {

    private let placeholder: UITextView = UITextView()
