     func didTapSendButton(text: String)
 }
 
-class ChatInputView: UIView {
+class ChatInputView: UIView, UITextFieldDelegate {
     weak var delegate: ChatInputDelegate?
 
     private let textField: UITextField = {

    override func resignFirstResponder() -> Bool {
        return textField.resignFirstResponder()
    }
}

        addSubview(button)
        addSubview(separator)

        textField.delegate = self
        button.addTarget(self, action: #selector(didTapSendButton), for: .touchUpInside)
        configureConstraints()
    }
