From f853275005aca1ac87d8f024709f459d05626f79 Mon Sep 17 00:00:00 2001 From: "Hedden, Kyle Matthew" Date: Mon, 19 Feb 2024 21:22:57 -0500 Subject: [PATCH] Add missing Label image attachment color tinting. --- MVMCoreUI/Atomic/Atoms/Views/Label/Label.swift | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/MVMCoreUI/Atomic/Atoms/Views/Label/Label.swift b/MVMCoreUI/Atomic/Atoms/Views/Label/Label.swift index 59611756..d69c501d 100644 --- a/MVMCoreUI/Atomic/Atoms/Views/Label/Label.swift +++ b/MVMCoreUI/Atomic/Atoms/Views/Label/Label.swift @@ -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()