correctly use defaultHeight

This commit is contained in:
Max Sokolov 2016-11-16 18:13:05 +03:00
parent 78b67e4c42
commit 9238ab8472
2 changed files with 2 additions and 2 deletions

View File

@ -21,7 +21,7 @@ class AutolayoutTableViewCell: UITableViewCell, ConfigurableCell {
static var estimatedHeight: CGFloat? {
return 150
}
func configure(with string: T) {
titleLabel.text = LoremIpsumTitle

View File

@ -115,7 +115,7 @@ open class TableDirector: NSObject, UITableViewDataSource, UITableViewDelegate {
cellRegisterer?.register(cellType: row.cellType, forCellReuseIdentifier: row.reuseIdentifier)
}
return row.estimatedHeight ?? rowHeightCalculator?.estimatedHeight(forRow: row, at: indexPath) ?? UITableViewAutomaticDimension
return row.defaultHeight ?? row.estimatedHeight ?? rowHeightCalculator?.estimatedHeight(forRow: row, at: indexPath) ?? UITableViewAutomaticDimension
}
open func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {