Skip to content

Commit 6f01260

Browse files
committed
update the UIView already when intializing it
This is for calculating the intrinsic size as soon as possible so that the wrong view size doesn't impact the layout.
1 parent 4331f52 commit 6f01260

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
@@ -49,6 +49,7 @@ struct TextView: UIViewRepresentable {
4949
view.textContainer.lineFragmentPadding = 0
5050
view.backgroundColor = .clear
5151
view.delegate = context.coordinator
52+
updateUIView(view, context: context)
5253
return view
5354
}
5455

0 commit comments

Comments
 (0)