From d50c61b79b54552bfdf57d08ba495784b111aecc Mon Sep 17 00:00:00 2001 From: Matt Bruce Date: Fri, 27 Jan 2023 10:48:59 -0600 Subject: [PATCH 1/2] updated to use bundle manager Signed-off-by: Matt Bruce --- VDS/Components/Label/Attributes/ImageLabelAttribute.swift | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/VDS/Components/Label/Attributes/ImageLabelAttribute.swift b/VDS/Components/Label/Attributes/ImageLabelAttribute.swift index fed62a91..f46e2e8c 100644 --- a/VDS/Components/Label/Attributes/ImageLabelAttribute.swift +++ b/VDS/Components/Label/Attributes/ImageLabelAttribute.swift @@ -57,11 +57,7 @@ public struct ImageLabelAttribute: AttachmentLabelAttributeModel { //get a local asset if let imageName { - guard let bundle = Bundle(identifier: "com.vzw.vds") else { - throw Error.bundleNotFound - } - - guard let image = UIImage(named: imageName, in: bundle, with: nil) else { + guard let image = BundleManager.shared.image(for: imageName) else { throw Error.imageNotFound(imageName) } From e5dd94aad94e3253593ef3d68d247a222da6606f Mon Sep 17 00:00:00 2001 From: Matt Bruce Date: Fri, 27 Jan 2023 12:44:28 -0600 Subject: [PATCH 2/2] fixed bug Signed-off-by: Matt Bruce --- VDS/Components/TextFields/EntryField/EntryField.swift | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/VDS/Components/TextFields/EntryField/EntryField.swift b/VDS/Components/TextFields/EntryField/EntryField.swift index 5e500b9a..7774d542 100644 --- a/VDS/Components/TextFields/EntryField/EntryField.swift +++ b/VDS/Components/TextFields/EntryField/EntryField.swift @@ -234,7 +234,7 @@ open class EntryField: Control, Accessable { } open func getToolTipView() -> UIView? { - guard let tooltipTitle, let tooltipContent else { + guard let tooltipTitle, let tooltipContent, !tooltipTitle.isEmpty, !tooltipContent.isEmpty else { return nil } @@ -351,9 +351,10 @@ open class EntryField: Control, Accessable { if let view = getToolTipView(), let oldText = updatedLabelText { tooltipView = view let toolTipAction = PassthroughSubject() - let toolTipUpdateText = "\(oldText) " //create a little space between the final character and tooltip image + let toolTipUpdateText = "\(oldText) " //create a little space between the final character and tooltip image + let toolTipAttribute = ToolTipLabelAttribute(action: toolTipAction, - location: toolTipUpdateText.count, + location: toolTipUpdateText.count - 1, length: 1, tintColor: primaryColorConfig.getColor(self)) updatedLabelText = toolTipUpdateText