소스 검색

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

cyberta 2 년 전
부모
커밋
971e718829
1개의 변경된 파일6개의 추가작업 그리고 1개의 파일을 삭제
  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() {