File tree 1 file changed +3
-2
lines changed
Adamant/Modules/Chat/View/Managers
1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change 127
127
let textContainer = NSTextContainer (
128
128
size: CGSize ( width: maxWidth, height: . greatestFiniteMagnitude)
129
129
)
130
+ textContainer. lineFragmentPadding = . zero
131
+
130
132
let layoutManager = NSLayoutManager ( )
131
133
132
134
layoutManager. addTextContainer ( textContainer)
133
135
134
136
let textStorage = NSTextStorage ( attributedString: attributedText)
135
137
textStorage. addLayoutManager ( layoutManager)
136
138
137
- let range = NSRange ( location: 0 , length: attributedText. length)
138
139
let rect = layoutManager. usedRect ( for: textContainer)
139
140
140
141
return rect. integral. size
170
171
private let messageLabelFont = UIFont . preferredFont ( forTextStyle: . body)
171
172
172
173
/// Additional width to fix incorrect size calculating
173
- private let additionalWidth : CGFloat = 5
174
+ private let additionalWidth : CGFloat = 5
174
175
private let additionalHeight : CGFloat = 5
You can’t perform that action at this time.
0 commit comments