code improvement
This commit is contained in:
parent
7561797211
commit
47f69aefd1
@ -8,7 +8,7 @@
|
||||
|
||||
import Foundation
|
||||
|
||||
@objcMembers public class ListTwoColumnPriceDescription: TableViewCell {
|
||||
@objcMembers open class ListTwoColumnPriceDescription: TableViewCell {
|
||||
|
||||
//-----------------------------------------------------
|
||||
// MARK: - Outlets
|
||||
@ -38,9 +38,9 @@ import Foundation
|
||||
super.setupView()
|
||||
contentView.addSubview(view)
|
||||
containerHelper.constrainView(view)
|
||||
|
||||
|
||||
rightLabel.numberOfLines = 1
|
||||
rightSubLabel.numberOfLines = 1
|
||||
|
||||
view.translatesAutoresizingMaskIntoConstraints = false
|
||||
leftVerticalStack.translatesAutoresizingMaskIntoConstraints = false
|
||||
rightVerticalStack.translatesAutoresizingMaskIntoConstraints = false
|
||||
@ -54,26 +54,22 @@ import Foundation
|
||||
rightVerticalStack.alignment = .trailing
|
||||
view.addSubview(leftVerticalStack)
|
||||
view.addSubview(rightVerticalStack)
|
||||
|
||||
NSLayoutConstraint.pinViews(leftView: leftVerticalStack, rightView: rightVerticalStack, alignTop: true)
|
||||
|
||||
}
|
||||
|
||||
//----------------------------------------------------
|
||||
// MARK: - Molecule
|
||||
//------------------------------------------------------
|
||||
|
||||
public override func set(with model: MoleculeModelProtocol, _ delegateObject: MVMCoreUIDelegateObject?, _ additionalData: [AnyHashable : Any]?) {
|
||||
open override func set(with model: MoleculeModelProtocol, _ delegateObject: MVMCoreUIDelegateObject?, _ additionalData: [AnyHashable : Any]?) {
|
||||
super.set(with: model, delegateObject, additionalData)
|
||||
guard let model = model as? ListTwoColumnPriceDescriptionModel else { return}
|
||||
leftHeadline.set(with: model.leftHeadline, delegateObject, additionalData)
|
||||
leftBody.set(with: model.leftBody, delegateObject, additionalData)
|
||||
rightLabel.set(with: model.rightLabel, delegateObject, additionalData)
|
||||
rightSubLabel.set(with: model.rightSubLabel, delegateObject, additionalData)
|
||||
|
||||
}
|
||||
|
||||
public override class func estimatedHeight(with molecule: MoleculeModelProtocol?, _ delegateObject: MVMCoreUIDelegateObject?) -> CGFloat? {
|
||||
open override class func estimatedHeight(with molecule: MoleculeModelProtocol?, _ delegateObject: MVMCoreUIDelegateObject?) -> CGFloat? {
|
||||
return 90
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user