Add new action .didEndDisplaying

This commit is contained in:
Anton Aleshkevich 2018-01-18 15:39:36 +03:00
parent 4712406618
commit a7488b1d4f
2 changed files with 5 additions and 0 deletions

View File

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

View File

@ -60,6 +60,7 @@ public enum TableRowActionType {
case deselect
case willSelect
case willDisplay
case didEndDisplaying
case shouldHighlight
case height
case canEdit