We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 62f187b commit 4331f52Copy full SHA for 4331f52
1 file changed
Sources/ResizingTextView/TextView (UIKit).swift
@@ -48,7 +48,6 @@ struct TextView: UIViewRepresentable {
48
view.setContentHuggingPriority(.defaultHigh, for: .vertical)
49
view.textContainer.lineFragmentPadding = 0
50
view.backgroundColor = .clear
51
- view.clipsToBounds = false
52
view.delegate = context.coordinator
53
return view
54
}
@@ -57,6 +56,7 @@ struct TextView: UIViewRepresentable {
57
56
var needsInvalidateIntrinsicContentSize = false
58
59
view.hasDynamicHeight = !isScrollable
+ view.clipsToBounds = isScrollable
60
61
if view.text != text {
62
view.text = text
0 commit comments