From c51dcfc5741706f6d5a4d28fd6f4c326fd18e30a Mon Sep 17 00:00:00 2001 From: Damodaram <> Date: Tue, 14 Apr 2020 14:13:04 +0530 Subject: [PATCH] arrow changes implemented --- .../ListRightVariablePriceChangeBodyText.swift | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/MVMCoreUI/Atomic/Molecules/DesignedComponents/List/RightVariable/ListRightVariablePriceChangeBodyText.swift b/MVMCoreUI/Atomic/Molecules/DesignedComponents/List/RightVariable/ListRightVariablePriceChangeBodyText.swift index 7b4be31f..07e74886 100644 --- a/MVMCoreUI/Atomic/Molecules/DesignedComponents/List/RightVariable/ListRightVariablePriceChangeBodyText.swift +++ b/MVMCoreUI/Atomic/Molecules/DesignedComponents/List/RightVariable/ListRightVariablePriceChangeBodyText.swift @@ -16,14 +16,15 @@ import Foundation public let eyebrowHeadlineBodyLink = EyebrowHeadlineBodyLink(frame: .zero) public let rightLabel = Label.commonLabelB2(true) public let arrow = Arrow(frame: .zero) - - + let arrowAndrightLabelStack: Stack // MARK: - Initializers public override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) { + arrowAndrightLabelStack = Stack.createStack(with: [(view: arrow, model: StackItemModel(horizontalAlignment: .fill)), + (view: rightLabel, model: StackItemModel(horizontalAlignment: .leading))], + axis: .horizontal, spacing: 4) stack = Stack.createStack(with: [(view: eyebrowHeadlineBodyLink, model: StackItemModel(horizontalAlignment: .leading)), - (view: rightLabel, model: StackItemModel(horizontalAlignment:.fill)), - (view: arrow, model: StackItemModel(horizontalAlignment:.fill))], + (view: arrowAndrightLabelStack, model: StackItemModel(verticalAlignment: .top))], axis: .horizontal) super.init(style: style, reuseIdentifier: reuseIdentifier) } @@ -37,8 +38,11 @@ import Foundation //----------------------------------------------------- override open func setupView() { super.setupView() + arrow.pinHeightAndWidth() addMolecule(stack) stack.restack() + arrowAndrightLabelStack.restack() + } open override func set(with model: MoleculeModelProtocol, _ delegateObject: MVMCoreUIDelegateObject?, _ additionalData: [AnyHashable : Any]?) { @@ -52,4 +56,8 @@ import Foundation open override class func estimatedHeight(with model: MoleculeModelProtocol, _ delegateObject: MVMCoreUIDelegateObject?) -> CGFloat? { return 120 } + open override func reset() { + super.reset() + rightLabel.styleB2(true) + } }