From 779bf8dd435a67038bd87e5532fdd6da6bb3d959 Mon Sep 17 00:00:00 2001 From: Max Sokolov Date: Tue, 24 May 2016 01:30:26 +0300 Subject: [PATCH] estimatedHeight to CGFloat --- Tablet/RowBuilder.swift | 2 +- Tablet/TableDirector.swift | 2 +- Tablet/TableRowBuilder.swift | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Tablet/RowBuilder.swift b/Tablet/RowBuilder.swift index e57bebc..4a07be7 100644 --- a/Tablet/RowBuilder.swift +++ b/Tablet/RowBuilder.swift @@ -25,7 +25,7 @@ public protocol RowBuilder { var reusableIdentifier: String { get } var numberOfRows: Int { get } - var estimatedRowHeight: Float { get } + var estimatedRowHeight: CGFloat { get } func rowHeight(index: Int) -> CGFloat diff --git a/Tablet/TableDirector.swift b/Tablet/TableDirector.swift index 1e21985..1882db2 100644 --- a/Tablet/TableDirector.swift +++ b/Tablet/TableDirector.swift @@ -142,7 +142,7 @@ public class TableDirector: NSObject, UITableViewDataSource, UITableViewDelegate // MARK: UITableViewDelegate - actions public func tableView(tableView: UITableView, estimatedHeightForRowAtIndexPath indexPath: NSIndexPath) -> CGFloat { - return CGFloat(builderAtIndexPath(indexPath).0.estimatedRowHeight) + return builderAtIndexPath(indexPath).0.estimatedRowHeight } public func tableView(tableView: UITableView, heightForRowAtIndexPath indexPath: NSIndexPath) -> CGFloat { diff --git a/Tablet/TableRowBuilder.swift b/Tablet/TableRowBuilder.swift index 1af47fa..bc23db0 100644 --- a/Tablet/TableRowBuilder.swift +++ b/Tablet/TableRowBuilder.swift @@ -37,7 +37,7 @@ public class TableBaseRowBuilder : TableBaseRowBuilder { - public override var estimatedRowHeight: Float { - return CellType.estimatedHeight() + public override var estimatedRowHeight: CGFloat { + return CGFloat(CellType.estimatedHeight()) } public init(item: DataType) {