minor changes

This commit is contained in:
Kruthika KP 2020-04-30 17:47:17 +05:30
parent 9a5ef15779
commit c0842d7740
2 changed files with 18 additions and 12 deletions

View File

@ -18,10 +18,14 @@ import Foundation
let rightDropDown = ItemDropdownEntryField()
var stack: Stack<StackModel>
//-------------------------------------------------------
// MARK: - Initializers
//-------------------------------------------------------
public override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
stack = Stack<StackModel>.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
}
}

View File

@ -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
}
}