From d0d8fa54cad223846be705ced3d055a13f4b1959 Mon Sep 17 00:00:00 2001 From: Lekshmi S Date: Thu, 13 Feb 2020 12:12:12 +0530 Subject: [PATCH] Code fixes and removed unwanted code. --- .../ListRightVariablePayments.swift | 19 ++++++------------- .../ListRightVariablePaymentsModel.swift | 3 +++ 2 files changed, 9 insertions(+), 13 deletions(-) diff --git a/MVMCoreUI/Molecules/DesignedComponents/List/RightVariable/ListRightVariablePayments.swift b/MVMCoreUI/Molecules/DesignedComponents/List/RightVariable/ListRightVariablePayments.swift index 851a2137..2fd75a66 100644 --- a/MVMCoreUI/Molecules/DesignedComponents/List/RightVariable/ListRightVariablePayments.swift +++ b/MVMCoreUI/Molecules/DesignedComponents/List/RightVariable/ListRightVariablePayments.swift @@ -15,20 +15,9 @@ import Foundation //------------------------------------------------------- let leftLabel = Label.commonLabelB2(true) - let rightImage = MFLoadImageView() + let rightImage = MFLoadImageView(pinnedEdges: .all) let stack = Stack(frame: .zero) - //------------------------------------------------------ - // MARK: - Properties - //------------------------------------------------------ - - let cellHeight: CGFloat = 65.0 - let leftPadding: CGFloat = 35.0 - let rightPadding: CGFloat = PaddingNine - let spaceBetweenLabelAndImage: CGFloat = 40.0 - let imageWidth: CGFloat = 56.0 - let imageHeight: CGFloat = 16.0 - //----------------------------------------------------- // MARK: - View Lifecycle //------------------------------------------------------- @@ -71,9 +60,13 @@ import Foundation leftLabel.horizontalAlignment = .fill let rightImage = StackItemModel() rightImage.horizontalAlignment = .trailing - let stackModel = StackModel(molecules: [leftLabel,rightLabel]) + let stackModel = StackModel(molecules: [leftLabel,rightImage]) stackModel.axis = .horizontal stack.model = stackModel stack.restack() } + + public override class func estimatedHeight(forRow molecule: MoleculeModelProtocol?, delegateObject: MVMCoreUIDelegateObject?) -> CGFloat? { + return 65 + } } diff --git a/MVMCoreUI/Molecules/DesignedComponents/List/RightVariable/ListRightVariablePaymentsModel.swift b/MVMCoreUI/Molecules/DesignedComponents/List/RightVariable/ListRightVariablePaymentsModel.swift index ef0693d0..08a6f3cb 100644 --- a/MVMCoreUI/Molecules/DesignedComponents/List/RightVariable/ListRightVariablePaymentsModel.swift +++ b/MVMCoreUI/Molecules/DesignedComponents/List/RightVariable/ListRightVariablePaymentsModel.swift @@ -29,6 +29,9 @@ public class ListRightVariablePaymentsModel: ContainerModel, ListItemModelProtoc if image.height == nil { image.height = 16.0 } + if image.width == nil { + image.height = 56.0 + } } public init(image: ImageViewModel, leftLabel: LabelModel) {