From c212af8cee9ade5f1e0631e52ecbc56ddae13158 Mon Sep 17 00:00:00 2001 From: Wu Zhong Date: Thu, 23 Nov 2017 18:12:32 +0800 Subject: [PATCH] Revert "update" --- Sources/Views/MessageInputBar.swift | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Sources/Views/MessageInputBar.swift b/Sources/Views/MessageInputBar.swift index 7f1bb2a6..70418118 100644 --- a/Sources/Views/MessageInputBar.swift +++ b/Sources/Views/MessageInputBar.swift @@ -421,7 +421,7 @@ open class MessageInputBar: UIView { open func calculateIntrinsicContentSize() -> CGSize { let maxTextViewSize = CGSize(width: inputTextView.bounds.width, height: .greatestFiniteMagnitude) - var heightToFit = inputTextView.sizeThatFits(maxTextViewSize).height.rounded() + padding.top + padding.bottom + textViewPadding.bottom + topStackView.bounds.height + bottomStackView.bounds.height + var heightToFit = inputTextView.sizeThatFits(maxTextViewSize).height.rounded() if heightToFit >= maxHeight { if !isOverMaxTextViewHeight { textViewHeightAnchor?.isActive = true @@ -546,7 +546,6 @@ open class MessageInputBar: UIView { guard superview != nil else { return } topStackView.layoutIfNeeded() } - invalidateIntrinsicContentSize() } performLayout(animated) {