remove tableView from CellHeightCalculatable

This commit is contained in:
Max Sokolov 2016-06-21 22:46:05 +03:00
parent acebd1c3e8
commit 126720f388
1 changed files with 1 additions and 3 deletions

View File

@ -22,8 +22,6 @@ import UIKit
public protocol CellHeightCalculatable {
var tableView: UITableView? { get set }
func height(row: Row, path: NSIndexPath) -> CGFloat
func estimatedHeight(row: Row, path: NSIndexPath) -> CGFloat
@ -32,7 +30,7 @@ public protocol CellHeightCalculatable {
public class PrototypeHeightStrategy: CellHeightCalculatable {
public weak var tableView: UITableView?
private weak var tableView: UITableView?
private var prototypes = [String: UITableViewCell]()
private var cachedHeights = [Int: CGFloat]()
private var separatorHeight = 1 / UIScreen.mainScreen().scale