Эх сурвалжийг харах

fix initial position of the text input bar, adapt the position if the keyboard is shown

cyberta 2 жил өмнө
parent
commit
971e718829

+ 6 - 1
deltachat-ios/Chat/ChatViewController2.swift

@@ -144,7 +144,12 @@ class ChatViewController2: UIViewController {
     }
 
     private func getInputTextHeight() -> CGFloat {
-        return 70
+        var bottomHeight: CGFloat = 0
+        if let keyboardManager = keyboardManager,
+            keyboardManager.isKeyboardDisappearing || keyboardManager.isKeyboardHidden {
+            bottomHeight = Utils.getSafeBottomLayoutInset()
+        }
+        return bottomHeight + textView.intrinsicContentSize.height
     }
 
     private func loadMessages() {