From a7488b1d4f1182b3d447722a66e554052fa67615 Mon Sep 17 00:00:00 2001 From: Anton Aleshkevich Date: Thu, 18 Jan 2018 15:39:36 +0300 Subject: [PATCH] Add new action .didEndDisplaying --- Sources/TableDirector.swift | 4 ++++ Sources/TableKit.swift | 1 + 2 files changed, 5 insertions(+) diff --git a/Sources/TableDirector.swift b/Sources/TableDirector.swift index 8dda56e..41798dd 100644 --- a/Sources/TableDirector.swift +++ b/Sources/TableDirector.swift @@ -240,6 +240,10 @@ open class TableDirector: NSObject, UITableViewDataSource, UITableViewDelegate { open func tableView(_ tableView: UITableView, willDisplay cell: UITableViewCell, forRowAt indexPath: IndexPath) { invoke(action: .willDisplay, cell: cell, indexPath: indexPath) } + + public func tableView(_ tableView: UITableView, didEndDisplaying cell: UITableViewCell, forRowAt indexPath: IndexPath) { + invoke(action: .didEndDisplaying, cell: cell, indexPath: indexPath) + } open func tableView(_ tableView: UITableView, shouldHighlightRowAt indexPath: IndexPath) -> Bool { return invoke(action: .shouldHighlight, cell: tableView.cellForRow(at: indexPath), indexPath: indexPath) as? Bool ?? true diff --git a/Sources/TableKit.swift b/Sources/TableKit.swift index bff0ef4..6b8b11c 100644 --- a/Sources/TableKit.swift +++ b/Sources/TableKit.swift @@ -60,6 +60,7 @@ public enum TableRowActionType { case deselect case willSelect case willDisplay + case didEndDisplaying case shouldHighlight case height case canEdit