From c0842d77400896e679332b1c924881d2028b9161 Mon Sep 17 00:00:00 2001 From: Kruthika KP <> Date: Thu, 30 Apr 2020 17:47:17 +0530 Subject: [PATCH] minor changes --- .../ListTwoColumnDropdownSelectors.swift | 19 +++++++++++++------ .../ListTwoColumnDropdownSelectorsModel.swift | 11 +++++------ 2 files changed, 18 insertions(+), 12 deletions(-) diff --git a/MVMCoreUI/Atomic/Molecules/DesignedComponents/List/TwoColumn/ListTwoColumnDropdownSelectors.swift b/MVMCoreUI/Atomic/Molecules/DesignedComponents/List/TwoColumn/ListTwoColumnDropdownSelectors.swift index e5ec022b..b31d85a2 100644 --- a/MVMCoreUI/Atomic/Molecules/DesignedComponents/List/TwoColumn/ListTwoColumnDropdownSelectors.swift +++ b/MVMCoreUI/Atomic/Molecules/DesignedComponents/List/TwoColumn/ListTwoColumnDropdownSelectors.swift @@ -18,10 +18,14 @@ import Foundation let rightDropDown = ItemDropdownEntryField() var stack: Stack + //------------------------------------------------------- + // MARK: - Initializers + //------------------------------------------------------- + public override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) { stack = Stack.createStack(with: [(view: leftDropDown, model: StackItemModel(percent: 50, horizontalAlignment: .leading)), - (view: rightDropDown, model: StackItemModel(percent: 50, horizontalAlignment: .leading))], - axis: .horizontal) + (view: rightDropDown, model: StackItemModel(percent: 50, horizontalAlignment: .trailing))], + axis: .horizontal,spacing: 10) super.init(style: style, reuseIdentifier: reuseIdentifier) } @@ -37,9 +41,9 @@ import Foundation addMolecule(stack) stack.restack() } - //---------------------------------------------------- - // MARK: - Molecule - //------------------------------------------------------ + //---------------------------------------------------- + // MARK: - Molecule + //------------------------------------------------------ override open func reset() { super.reset() @@ -52,7 +56,10 @@ import Foundation guard let model = model as? ListTwoColumnDropdownSelectorsModel else { return} leftDropDown.set(with:model.leftDropDown, delegateObject, additionalData) rightDropDown.set(with:model.rightDropDown, delegateObject, additionalData) - + } + + open override class func estimatedHeight(with model: MoleculeModelProtocol, _ delegateObject: MVMCoreUIDelegateObject?) -> CGFloat { + return 121 } } diff --git a/MVMCoreUI/Atomic/Molecules/DesignedComponents/List/TwoColumn/ListTwoColumnDropdownSelectorsModel.swift b/MVMCoreUI/Atomic/Molecules/DesignedComponents/List/TwoColumn/ListTwoColumnDropdownSelectorsModel.swift index d8ea6223..9a8a99ad 100644 --- a/MVMCoreUI/Atomic/Molecules/DesignedComponents/List/TwoColumn/ListTwoColumnDropdownSelectorsModel.swift +++ b/MVMCoreUI/Atomic/Molecules/DesignedComponents/List/TwoColumn/ListTwoColumnDropdownSelectorsModel.swift @@ -10,12 +10,11 @@ import Foundation public class ListTwoColumnDropdownSelectorsModel: ListItemModel, MoleculeModelProtocol { - public var divider: LineModel? public static var identifier: String = "list2CDrpDrp1" public var leftDropDown: ItemDropdownEntryFieldModel public var rightDropDown: ItemDropdownEntryFieldModel - /// Defaults to set + // Defaults to set override public func setDefaults() { if useHorizontalMargins == nil { useHorizontalMargins = true @@ -23,11 +22,11 @@ public class ListTwoColumnDropdownSelectorsModel: ListItemModel, MoleculeModelPr if useVerticalMargins == nil { useVerticalMargins = true } - if topMarginPadding == nil { - topMarginPadding = 24 + if topPadding == nil { + topPadding = 20 } - if bottomMarginPadding == nil { - bottomMarginPadding = 0 + if bottomPadding == nil { + bottomPadding = 0 } }