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