Skip to content

Commit 7fd0ec7

Browse files
committed
add height calculation for titletableviewcell from example
1 parent 88b3cc5 commit 7fd0ec7

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

Example/ReactiveDataDisplayManager/Table/Views/Cells/TitleTableViewCell/TitleTableViewCell.swift

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,11 @@ class TitleTableViewCell: UITableViewCell, CalculatableHeightItem {
2929
// MARK: - CalculatableHeightItem
3030

3131
static func getHeight(forWidth width: CGFloat, with model: String) -> CGFloat {
32-
return 44
32+
let verticalInsets: CGFloat = 22
33+
let horizontalInsets: CGFloat = 96
34+
let titleHeight = model.getHeight(withConstrainedWidth: width - horizontalInsets,
35+
font: .preferredFont(forTextStyle: .body))
36+
return titleHeight + verticalInsets
3337
}
3438

3539
}

0 commit comments

Comments
 (0)