code refactoring
This commit is contained in:
parent
b5bbce6294
commit
1b3766e2b7
@ -7,7 +7,7 @@
|
||||
//
|
||||
|
||||
import Foundation
|
||||
@objcMembers public class ListOneColumnTextWithWhitespaceDividerTall: TableViewCell {
|
||||
@objcMembers open class ListOneColumnTextWithWhitespaceDividerTall: TableViewCell {
|
||||
|
||||
//-----------------------------------------------------
|
||||
// MARK: - Outlets
|
||||
@ -16,10 +16,11 @@ import Foundation
|
||||
let headline = Label.commonLabelH3(true)
|
||||
let body = Label.commonLabelB2(true)
|
||||
|
||||
|
||||
// MARK: - Initializers
|
||||
public override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
|
||||
stack = Stack<StackModel>.createStack(with: [(view: headline, model: StackItemModel(horizontalAlignment: .leading)),(view: body, model: StackItemModel(spacing: 5,horizontalAlignment: .leading))],axis: .vertical)
|
||||
stack = Stack<StackModel>.createStack(with: [(view: headline, model: StackItemModel(horizontalAlignment: .leading)),
|
||||
(view: body, model: StackItemModel(spacing: 5,horizontalAlignment: .leading))],
|
||||
axis: .vertical)
|
||||
super.init(style: style, reuseIdentifier: reuseIdentifier)
|
||||
}
|
||||
|
||||
@ -34,16 +35,13 @@ import Foundation
|
||||
super.setupView()
|
||||
addMolecule(stack)
|
||||
stack.restack()
|
||||
|
||||
|
||||
}
|
||||
|
||||
open override func set(with model: MoleculeModelProtocol, _ delegateObject: MVMCoreUIDelegateObject?, _ additionalData: [AnyHashable : Any]?){
|
||||
super.set(with: model, delegateObject, additionalData)
|
||||
guard let model = model as? ListOneColumnTextWithWhitespaceDividerTallModel else { return }
|
||||
headline.setOptional(with: model.headline, delegateObject, additionalData)
|
||||
body.setOptional(with: model.body, delegateObject, additionalData)
|
||||
|
||||
headline.set(with: model.headline, delegateObject, additionalData)
|
||||
body.set(with: model.body, delegateObject, additionalData)
|
||||
}
|
||||
|
||||
open override class func estimatedHeight(with model: MoleculeModelProtocol, _ delegateObject: MVMCoreUIDelegateObject?) -> CGFloat? {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user