Removed stack
This commit is contained in:
parent
4ef184ddc1
commit
f3314af68f
@ -13,14 +13,12 @@ import Foundation
|
||||
//-----------------------------------------------------
|
||||
// MARK: - Outlets
|
||||
//-----------------------------------------------------
|
||||
var stack: Stack<StackModel>
|
||||
let headlineBody = HeadlineBody(frame: .zero)
|
||||
public var headlineBody = HeadlineBody(frame: .zero)
|
||||
|
||||
//-----------------------------------------------------
|
||||
// MARK: - Initializers
|
||||
//-----------------------------------------------------
|
||||
public override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
|
||||
stack = Stack<StackModel>.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? {
|
||||
|
||||
@ -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)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user