From 47f69aefd1ab44a838f3c111c964431fcef443bb Mon Sep 17 00:00:00 2001 From: Subhankar Acharya Date: Thu, 12 Mar 2020 10:29:24 +0530 Subject: [PATCH] code improvement --- .../TwoColumn/ListTwoColumnPriceDescription.swift | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/MVMCoreUI/Molecules/DesignedComponents/SectionDividers/TwoColumn/ListTwoColumnPriceDescription.swift b/MVMCoreUI/Molecules/DesignedComponents/SectionDividers/TwoColumn/ListTwoColumnPriceDescription.swift index 9f73dba8..95377b57 100644 --- a/MVMCoreUI/Molecules/DesignedComponents/SectionDividers/TwoColumn/ListTwoColumnPriceDescription.swift +++ b/MVMCoreUI/Molecules/DesignedComponents/SectionDividers/TwoColumn/ListTwoColumnPriceDescription.swift @@ -8,7 +8,7 @@ import Foundation -@objcMembers public class ListTwoColumnPriceDescription: TableViewCell { +@objcMembers open class ListTwoColumnPriceDescription: TableViewCell { //----------------------------------------------------- // MARK: - Outlets @@ -38,9 +38,9 @@ import Foundation super.setupView() contentView.addSubview(view) containerHelper.constrainView(view) - + + rightLabel.numberOfLines = 1 rightSubLabel.numberOfLines = 1 - view.translatesAutoresizingMaskIntoConstraints = false leftVerticalStack.translatesAutoresizingMaskIntoConstraints = false rightVerticalStack.translatesAutoresizingMaskIntoConstraints = false @@ -54,26 +54,22 @@ import Foundation rightVerticalStack.alignment = .trailing view.addSubview(leftVerticalStack) view.addSubview(rightVerticalStack) - NSLayoutConstraint.pinViews(leftView: leftVerticalStack, rightView: rightVerticalStack, alignTop: true) - } - //---------------------------------------------------- // MARK: - Molecule //------------------------------------------------------ - public override func set(with model: MoleculeModelProtocol, _ delegateObject: MVMCoreUIDelegateObject?, _ additionalData: [AnyHashable : Any]?) { + open override func set(with model: MoleculeModelProtocol, _ delegateObject: MVMCoreUIDelegateObject?, _ additionalData: [AnyHashable : Any]?) { super.set(with: model, delegateObject, additionalData) guard let model = model as? ListTwoColumnPriceDescriptionModel else { return} leftHeadline.set(with: model.leftHeadline, delegateObject, additionalData) leftBody.set(with: model.leftBody, delegateObject, additionalData) rightLabel.set(with: model.rightLabel, delegateObject, additionalData) rightSubLabel.set(with: model.rightSubLabel, delegateObject, additionalData) - } - public override class func estimatedHeight(with molecule: MoleculeModelProtocol?, _ delegateObject: MVMCoreUIDelegateObject?) -> CGFloat? { + open override class func estimatedHeight(with molecule: MoleculeModelProtocol?, _ delegateObject: MVMCoreUIDelegateObject?) -> CGFloat? { return 90 }