Another update.

This commit is contained in:
Michael Griebling
2023-01-18 09:38:31 -05:00
parent a31f3ae7b6
commit 19ead06e4c

View File

@@ -149,7 +149,7 @@ class MTCTLineDisplay : MTDisplay {
override var textColor: MTColor? { override var textColor: MTColor? {
set { set {
super.textColor = newValue super.textColor = newValue
let attrStr = NSMutableAttributedString(attributedString: self.attributedString!) let attrStr = attributedString!.mutableCopy() as! NSMutableAttributedString
let foregroundColor = NSAttributedString.Key(kCTForegroundColorAttributeName as String) let foregroundColor = NSAttributedString.Key(kCTForegroundColorAttributeName as String)
attrStr.addAttribute(foregroundColor, value:self.textColor!.cgColor, range:NSMakeRange(0, attrStr.length)) attrStr.addAttribute(foregroundColor, value:self.textColor!.cgColor, range:NSMakeRange(0, attrStr.length))
self.attributedString = attrStr self.attributedString = attrStr