removed code and call the code that does the same thing under the hood.
Signed-off-by: Matt Bruce <matt.bruce@verizon.com>
This commit is contained in:
parent
dcb5b91e32
commit
b638637af7
@ -182,29 +182,7 @@ public typealias ActionBlock = () -> ()
|
||||
}
|
||||
|
||||
@objc public func resetAttributeStyle() {
|
||||
/*
|
||||
* This is to address a reuse issue with iOS 13 and up.
|
||||
* Even if you set text & attributedText to nil, the moment you set text with a value,
|
||||
* attributedText will hold a dirty value from a previously reused cell even if reset() is
|
||||
* appropriately called.
|
||||
* Only other reference found of issue: https://www.thetopsites.net/article/58142205.shtml
|
||||
*/
|
||||
if let text = text, !text.isEmpty {
|
||||
|
||||
//create the primary string
|
||||
let mutableText = NSMutableAttributedString.mutableText(for: text,
|
||||
textStyle: textStyle,
|
||||
useScaledFont: useScaledFont,
|
||||
textColor: textColorConfiguration.getColor(self),
|
||||
alignment: textAlignment,
|
||||
lineBreakMode: lineBreakMode)
|
||||
|
||||
if let attributes = attributes {
|
||||
mutableText.apply(attributes: attributes)
|
||||
}
|
||||
|
||||
self.attributedText = mutableText
|
||||
}
|
||||
setNeedsUpdate()
|
||||
}
|
||||
|
||||
public func viewModelDidUpdate() {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user