diff --git a/Sources/HeightStrategy.swift b/Sources/HeightStrategy.swift index 084018c..f873906 100644 --- a/Sources/HeightStrategy.swift +++ b/Sources/HeightStrategy.swift @@ -26,6 +26,8 @@ public protocol CellHeightCalculatable { func height(row: Row, path: NSIndexPath) -> CGFloat func estimatedHeight(row: Row, path: NSIndexPath) -> CGFloat + + func invalidate() } public class PrototypeHeightStrategy: CellHeightCalculatable { @@ -63,4 +65,8 @@ public class PrototypeHeightStrategy: CellHeightCalculatable { public func estimatedHeight(row: Row, path: NSIndexPath) -> CGFloat { return UITableViewAutomaticDimension } + + public func invalidate() { + cachedHeights.removeAll() + } } \ No newline at end of file