From 126720f388450a839d72415ee1cf28a294ef04ba Mon Sep 17 00:00:00 2001 From: Max Sokolov Date: Tue, 21 Jun 2016 22:46:05 +0300 Subject: [PATCH] remove tableView from CellHeightCalculatable --- Sources/HeightStrategy.swift | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/Sources/HeightStrategy.swift b/Sources/HeightStrategy.swift index c6e7d25..1fbc0cd 100644 --- a/Sources/HeightStrategy.swift +++ b/Sources/HeightStrategy.swift @@ -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