estimatedHeight to CGFloat

This commit is contained in:
Max Sokolov 2016-05-24 01:30:26 +03:00
parent ba8aa05d8b
commit 779bf8dd43
3 changed files with 5 additions and 5 deletions

View File

@ -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

View File

@ -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 {

View File

@ -37,7 +37,7 @@ public class TableBaseRowBuilder<DataType, CellType where CellType: UITableViewC
return items.count
}
public var estimatedRowHeight: Float {
public var estimatedRowHeight: CGFloat {
return 44
}
@ -120,8 +120,8 @@ public class TableBaseRowBuilder<DataType, CellType where CellType: UITableViewC
*/
public class TableRowBuilder<DataType, CellType: ConfigurableCell where CellType.T == DataType, CellType: UITableViewCell> : TableBaseRowBuilder<DataType, CellType> {
public override var estimatedRowHeight: Float {
return CellType.estimatedHeight()
public override var estimatedRowHeight: CGFloat {
return CGFloat(CellType.estimatedHeight())
}
public init(item: DataType) {