Quellcode durchsuchen

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

cyberta vor 2 Jahren
Ursprung
Commit
971e718829
1 geänderte Dateien mit 6 neuen und 1 gelöschten Zeilen
  1. 6 1
      deltachat-ios/Chat/ChatViewController2.swift

+ 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() {