diff --git a/MVMCoreUI/Atomic/Molecules/DesignedComponents/Headers/H2/HeadersH2PricingTwoRows.swift b/MVMCoreUI/Atomic/Molecules/DesignedComponents/Headers/H2/HeadersH2PricingTwoRows.swift index 1baf057c..f38793eb 100644 --- a/MVMCoreUI/Atomic/Molecules/DesignedComponents/Headers/H2/HeadersH2PricingTwoRows.swift +++ b/MVMCoreUI/Atomic/Molecules/DesignedComponents/Headers/H2/HeadersH2PricingTwoRows.swift @@ -42,6 +42,13 @@ import Foundation return Stack.createStack(with: [headline, horizontalStack], spacing: 8) }() + + //------------------------------------------------------- + // MARK: - Constraints + //------------------------------------------------------- + public var verticalLine1HeightConstraint: NSLayoutConstraint? + public var verticalLine2HeightConstraint: NSLayoutConstraint? + //------------------------------------------------------- // MARK: - Lifecycle //------------------------------------------------------- @@ -51,11 +58,10 @@ import Foundation body.lineBreakMode = .byTruncatingTail body2.lineBreakMode = .byTruncatingTail body3.lineBreakMode = .byTruncatingTail - - verticalLine1.widthConstraint?.isActive = true - verticalLine1.backgroundColor = .mvmBlack - verticalLine2.widthConstraint?.isActive = true - verticalLine2.backgroundColor = .mvmBlack + + // setup lines + verticalLine1.orientation = .vertical + verticalLine2.orientation = .vertical addMolecule(stack) stack.restack() @@ -80,13 +86,13 @@ import Foundation } open func setLineHeight() { - verticalLine1.heightConstraint?.isActive = false - verticalLine1.heightConstraint = verticalLine1.heightAnchor.constraint(equalTo: body2.heightAnchor, multiplier: 1) - verticalLine1.heightConstraint?.isActive = true + verticalLine1HeightConstraint?.isActive = false + verticalLine1HeightConstraint = verticalLine1.heightAnchor.constraint(equalTo: body2.heightAnchor, multiplier: 1) + verticalLine1HeightConstraint?.isActive = true - verticalLine2.heightConstraint?.isActive = false - verticalLine2.heightConstraint = verticalLine2.heightAnchor.constraint(equalTo: body3.heightAnchor, multiplier: 1) - verticalLine2.heightConstraint?.isActive = true + verticalLine2HeightConstraint?.isActive = false + verticalLine2HeightConstraint = verticalLine2.heightAnchor.constraint(equalTo: body3.heightAnchor, multiplier: 1) + verticalLine2HeightConstraint?.isActive = true } //----------------------------------------------------