Skip to content

Commit 949dc75

Browse files
authored
Revert "Calculate scroll view frame correctly" (#83)
* Revert "Stick the offset when height changes (#81)" This reverts commit 41e1a67. * Revert "Calculate scroll view frame correctly (#72)" This reverts commit 5d30ee4.
1 parent 41e1a67 commit 949dc75

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

MessageViewController/MessageViewController.swift

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -129,12 +129,11 @@ open class MessageViewController: UIViewController, MessageAutocompleteControlle
129129
let originalOffset = scrollView.contentOffset
130130
let heightChange = scrollView.frame.height - messageViewFrame.minY
131131

132-
let frame = scrollView.frame
133132
scrollView.frame = CGRect(
134-
x: frame.minX,
135-
y: frame.minY,
136-
width: frame.width,
137-
height: messageViewFrame.minY - frame.minY
133+
x: bounds.minX,
134+
y: bounds.minY,
135+
width: bounds.width,
136+
height: messageViewFrame.minY
138137
)
139138

140139
if updateOffset, heightChange != 0 {

0 commit comments

Comments
 (0)