From f05ea2aac652503fafc7f13ad1afcfdedcd2916f Mon Sep 17 00:00:00 2001 From: Matt Bruce Date: Thu, 15 Feb 2024 16:10:51 -0600 Subject: [PATCH] depricated methods and updated attribute addition Signed-off-by: Matt Bruce --- MVMCoreUI/Atomic/Atoms/Views/Label/Label.swift | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/MVMCoreUI/Atomic/Atoms/Views/Label/Label.swift b/MVMCoreUI/Atomic/Atoms/Views/Label/Label.swift index 6d33d8ce..37eff177 100644 --- a/MVMCoreUI/Atomic/Atoms/Views/Label/Label.swift +++ b/MVMCoreUI/Atomic/Atoms/Views/Label/Label.swift @@ -27,7 +27,9 @@ public typealias ActionBlock = () -> () public var standardFontSize: CGFloat = 0.0 /// Set this to use a custom sizing object during updateView instead of the standard. + @available(*, deprecated, message: "VDS is maintaining scaleSize") public var sizeObject: MFSizeObject? + @available(*, deprecated, message: "VDS is maintaining scaleSize") public var scaleSize: NSNumber? /// A specific text index to use as a unique marker. @@ -292,11 +294,6 @@ public typealias ActionBlock = () -> () @objc open func setScale(_ scale: Bool) { if scale { standardFontSize = font.pointSize - if let floatScale = scaleSize?.floatValue { - updateView(CGFloat(floatScale)) - } else { - updateView(MVMCoreUIUtility.getWidth()) - } } else { standardFontSize = 0 } @@ -471,7 +468,12 @@ extension Label { .sink { _ in actionBlock() } - attributes?.append(textLink) + if var attributes { + attributes.append(textLink) + setNeedsUpdate() + } else { + attributes = [textLink] + } } @objc public func clearActionableClauses() {