Skip to content

Commit 79aa369

Browse files
committed
Call layoutIfNeeded() in updateUIView()
Otherwise, the size calculation could be too late for some animations controlled by SwiftUI.
1 parent 82f1173 commit 79aa369

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

Sources/ResizingTextView/TextView (UIKit).swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,7 @@ struct TextView: UIViewRepresentable {
103103

104104
if needsInvalidateIntrinsicContentSize, !isScrollable {
105105
view.invalidateIntrinsicContentSize()
106+
view.layoutIfNeeded()
106107
}
107108
}
108109

0 commit comments

Comments
 (0)