File tree Expand file tree Collapse file tree 2 files changed +16
-0
lines changed
Expand file tree Collapse file tree 2 files changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -30,6 +30,7 @@ internal class NextGrowingInternalTextView: UITextView {
3030 // MARK: - Internal
3131
3232 var didChange : ( ) -> Void = { }
33+ var didUpdateHeightDependencies : ( ) -> Void = { }
3334
3435 override init ( frame: CGRect , textContainer: NSTextContainer ? ) {
3536 super. init ( frame: frame, textContainer: textContainer)
@@ -58,6 +59,18 @@ internal class NextGrowingInternalTextView: UITextView {
5859 updatePlaceholder ( )
5960 }
6061 }
62+
63+ override var font : UIFont ? {
64+ didSet {
65+ didUpdateHeightDependencies ( )
66+ }
67+ }
68+
69+ override var textContainerInset : UIEdgeInsets {
70+ didSet {
71+ didUpdateHeightDependencies ( )
72+ }
73+ }
6174
6275 var placeholderAttributedText : NSAttributedString ? {
6376 didSet {
Original file line number Diff line number Diff line change @@ -162,6 +162,9 @@ open class NextGrowingTextView: UIScrollView {
162162 _textView. didChange = { [ weak self] in
163163 self ? . fitToScrollView ( )
164164 }
165+ _textView. didUpdateHeightDependencies = { [ weak self] in
166+ self ? . updateMinimumAndMaximumHeight ( )
167+ }
165168 }
166169
167170 private func measureTextViewSize( ) -> CGSize {
You can’t perform that action at this time.
0 commit comments