From f3314af68f9074d9a378241825c3b68cc99dea7f Mon Sep 17 00:00:00 2001 From: Kruthika KP <> Date: Mon, 9 Mar 2020 10:18:20 +0530 Subject: [PATCH] Removed stack --- .../OneColumn/ListOneColumnFullWidthTextBodyText.swift | 7 ++----- .../ListOneColumnFullWidthTextBodyTextModel.swift | 3 +-- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/MVMCoreUI/Molecules/DesignedComponents/List/OneColumn/ListOneColumnFullWidthTextBodyText.swift b/MVMCoreUI/Molecules/DesignedComponents/List/OneColumn/ListOneColumnFullWidthTextBodyText.swift index f32e0797..da415a10 100644 --- a/MVMCoreUI/Molecules/DesignedComponents/List/OneColumn/ListOneColumnFullWidthTextBodyText.swift +++ b/MVMCoreUI/Molecules/DesignedComponents/List/OneColumn/ListOneColumnFullWidthTextBodyText.swift @@ -13,14 +13,12 @@ import Foundation //----------------------------------------------------- // MARK: - Outlets //----------------------------------------------------- - var stack: Stack - let headlineBody = HeadlineBody(frame: .zero) + public var headlineBody = HeadlineBody(frame: .zero) //----------------------------------------------------- // MARK: - Initializers //----------------------------------------------------- public override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) { - stack = Stack.createStack(with: [headlineBody]) super.init(style: style, reuseIdentifier: reuseIdentifier) } @@ -33,14 +31,13 @@ import Foundation //----------------------------------------------------- override open func setupView() { super.setupView() - addMolecule(stack) + addMolecule(headlineBody) } open override func set(with model: MoleculeModelProtocol, _ delegateObject: MVMCoreUIDelegateObject?, _ additionalData: [AnyHashable : Any]?){ super.set(with: model, delegateObject, additionalData) guard let model = model as? ListOneColumnFullWidthTextBodyTextModel else { return } headlineBody.set(with: model.headlineBody, delegateObject, additionalData) - stack.restack() } open override class func estimatedHeight(with model: MoleculeModelProtocol, _ delegateObject: MVMCoreUIDelegateObject?) -> CGFloat? { diff --git a/MVMCoreUI/Molecules/DesignedComponents/List/OneColumn/ListOneColumnFullWidthTextBodyTextModel.swift b/MVMCoreUI/Molecules/DesignedComponents/List/OneColumn/ListOneColumnFullWidthTextBodyTextModel.swift index 5109316a..138cc69a 100644 --- a/MVMCoreUI/Molecules/DesignedComponents/List/OneColumn/ListOneColumnFullWidthTextBodyTextModel.swift +++ b/MVMCoreUI/Molecules/DesignedComponents/List/OneColumn/ListOneColumnFullWidthTextBodyTextModel.swift @@ -15,7 +15,6 @@ public class ListOneColumnFullWidthTextBodyTextModel: ListItemModel, MoleculeMod public init(headlineBody: HeadlineBodyModel) { self.headlineBody = headlineBody super.init() - setDefaults() } // Defaults to set @@ -35,7 +34,7 @@ public class ListOneColumnFullWidthTextBodyTextModel: ListItemModel, MoleculeMod try super.init(from: decoder) } - public override func encode(to encoder: Encoder) throws { + public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) try container.encode(moleculeName, forKey: .moleculeName)