|
@@ -43,6 +43,7 @@ class ChatViewController2: UIViewController {
|
|
textView.font = UIFont.preferredFont(forTextStyle: .body)
|
|
textView.font = UIFont.preferredFont(forTextStyle: .body)
|
|
textView.backgroundColor = DcColors.inputFieldColor
|
|
textView.backgroundColor = DcColors.inputFieldColor
|
|
textView.isEditable = true
|
|
textView.isEditable = true
|
|
|
|
+ textView.delegate = self
|
|
return textView
|
|
return textView
|
|
}()
|
|
}()
|
|
|
|
|
|
@@ -225,3 +226,10 @@ extension ChatViewController2: UITableViewDataSource {
|
|
return UITableViewCell()
|
|
return UITableViewCell()
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+// MARK: - UITextViewDelegate
|
|
|
|
+extension ChatViewController2: UITextViewDelegate {
|
|
|
|
+ func textViewDidChange(_ textView: UITextView) {
|
|
|
|
+ self.bottomInset = self.getInputTextHeight() + (self.keyboardManager?.keyboardHeight ?? 0)
|
|
|
|
+ }
|
|
|
|
+}
|