From 21fc9c1802385206368ec37e9768d77403524e69 Mon Sep 17 00:00:00 2001 From: Subhankar Acharya Date: Fri, 14 Feb 2020 17:46:56 +0530 Subject: [PATCH] Adding up the percentages for stacks. --- .../List/RightVariable/ListRightVariablePayments.swift | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/MVMCoreUI/Molecules/DesignedComponents/List/RightVariable/ListRightVariablePayments.swift b/MVMCoreUI/Molecules/DesignedComponents/List/RightVariable/ListRightVariablePayments.swift index 626e8d42..e46cc469 100644 --- a/MVMCoreUI/Molecules/DesignedComponents/List/RightVariable/ListRightVariablePayments.swift +++ b/MVMCoreUI/Molecules/DesignedComponents/List/RightVariable/ListRightVariablePayments.swift @@ -37,16 +37,14 @@ import Foundation contentView.addSubview(stack) containerHelper.constrainView(stack) } - //---------------------------------------------------- // MARK: - Molecule //------------------------------------------------------ - override open func reset() { super.reset() stack.reset() } - +   public override func setWithModel(_ model: MoleculeModelProtocol?, _ delegateObject: MVMCoreUIDelegateObject?, _ additionalData: [AnyHashable : Any]?) { super.setWithModel(model, delegateObject, additionalData) guard let model = model as? ListRightVariablePaymentsModel else { return} @@ -54,9 +52,9 @@ import Foundation rightImage.setWithModel(model.image, delegateObject, additionalData) // Create a stack model to use for the internal stack and set the alignment of label and image - let leftLabel = StackItemModel() + let leftLabel = StackItemModel(percent: 70) leftLabel.horizontalAlignment = .leading - let rightImage = StackItemModel() + let rightImage = StackItemModel(percent: 30) rightImage.horizontalAlignment = .trailing let stackModel = StackModel(molecules: [leftLabel,rightImage]) stackModel.axis = .horizontal