estimated height

This commit is contained in:
Pfeil, Scott Robert 2020-01-31 16:29:46 -05:00
parent 37228669e0
commit e2f1da7c27

View File

@ -101,6 +101,11 @@ import UIKit
}
// MARK: - ModelMoleculeViewProtocol
public override class func estimatedHeight(forRow molecule: MoleculeModelProtocol?, delegateObject: MVMCoreUIDelegateObject?) -> CGFloat? {
guard let model = molecule as? TwoButtonViewModel else { return 0 }
return PillButton.estimatedHeight(forRow: model.primaryButton ?? model.secondaryButton, delegateObject: delegateObject)
}
public override func setWithModel(_ model: MoleculeModelProtocol?, _ delegateObject: MVMCoreUIDelegateObject?, _ additionalData: [AnyHashable: Any]?) {
super.setWithJSON(json, delegateObject: delegateObject, additionalData: additionalData)
guard let model = model as? TwoButtonViewModel else { return }