Add missing Label image attachment color tinting.

This commit is contained in:
Hedden, Kyle Matthew 2024-02-19 21:22:57 -05:00
parent ef0f47cbc4
commit f853275005

View File

@ -368,6 +368,10 @@ public typealias ActionBlock = () -> ()
imageAttachment = Label.getTextAttachmentImage(name: imageName, dimension: fontSize)
}
if let tintColor = imageAtt.tintColor {
imageAttachment.image = imageAttachment.image?.withTintColor(tintColor.uiColor, renderingMode: .alwaysTemplate)
}
// Confirm that the intended image location is within range.
if 0...labelText.count ~= imageAtt.location {
let mutableString = NSMutableAttributedString()