code refactoring
This commit is contained in:
parent
7928d8a51c
commit
9583ba9c5d
@ -7,7 +7,7 @@
|
||||
//
|
||||
|
||||
import Foundation
|
||||
@objcMembers public class ListOneColumnFullWidthTextDividerSubsection: TableViewCell {
|
||||
@objcMembers open class ListOneColumnFullWidthTextDividerSubsection: TableViewCell {
|
||||
|
||||
//-----------------------------------------------------
|
||||
// MARK: - Outlets
|
||||
@ -16,7 +16,6 @@ import Foundation
|
||||
let headline = Label.commonLabelB1(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)
|
||||
@ -34,16 +33,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? ListOneColumnFullWidthTextDividerSubsectionModel 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? {
|
||||
@ -54,6 +50,5 @@ import Foundation
|
||||
super.reset()
|
||||
headline.styleB1(true)
|
||||
body.styleB2(true)
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -107,6 +107,8 @@ import Foundation
|
||||
MVMCoreUIMoleculeMappingObject.shared()?.register(viewClass: ListRVWheel.self, viewModelClass: ListRVWheelModel.self)
|
||||
MVMCoreUIMoleculeMappingObject.shared()?.register(viewClass: ListOneColumnFullWidthTextAllTextAndLinks.self, viewModelClass: ListOneColumnFullWidthTextAllTextAndLinksModel.self)
|
||||
MVMCoreUIMoleculeMappingObject.shared()?.register(viewClass: ListOneColumnFullWidthTextBodyText.self, viewModelClass: ListOneColumnFullWidthTextBodyTextModel.self)
|
||||
MVMCoreUIMoleculeMappingObject.shared()?.register(viewClass: ListOneColumnFullWidthTextDividerSubsection.self, viewModelClass: ListOneColumnFullWidthTextDividerSubsectionModel.self)
|
||||
|
||||
|
||||
// Designed Section Dividers
|
||||
MVMCoreUIMoleculeMappingObject.shared()?.register(viewClass: ListFourColumnDataUsageDivider.self, viewModelClass: ListFourColumnDataUsageDividerModel.self)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user