From eacee20fe97d5a2f2733849a696efc089d40ab08 Mon Sep 17 00:00:00 2001 From: Matt Bruce Date: Wed, 25 Jan 2023 18:20:11 -0600 Subject: [PATCH] added init Signed-off-by: Matt Bruce --- .../Label/Attributes/ToolTipLabelAttribute.swift | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/VDS/Components/Label/Attributes/ToolTipLabelAttribute.swift b/VDS/Components/Label/Attributes/ToolTipLabelAttribute.swift index 39e6277c..f42ac630 100644 --- a/VDS/Components/Label/Attributes/ToolTipLabelAttribute.swift +++ b/VDS/Components/Label/Attributes/ToolTipLabelAttribute.swift @@ -12,7 +12,7 @@ import Combine public struct ToolTipLabelAttribute: ActionLabelAttributeModel { public var id = UUID() public var accessibleText: String? = "Tool Tip" - public var action = PassthroughSubject() + public var action: PassthroughSubject public var location: Int public var length: Int public var tintColor: UIColor @@ -28,6 +28,14 @@ public struct ToolTipLabelAttribute: ActionLabelAttributeModel { } + public init(action: PassthroughSubject = .init(), location: Int, length: Int, tintColor: UIColor = .black, accessibleText: String? = nil){ + self.action = action + self.location = location + self.length = length + self.tintColor = tintColor + self.accessibleText = accessibleText + } + public static func == (lhs: ToolTipLabelAttribute, rhs: ToolTipLabelAttribute) -> Bool { lhs.isEqual(rhs) }