Merge pull request #73 from sc0rch/master

Add new action .didEndDisplaying
This commit is contained in:
Max Sokolov 2018-01-18 22:36:06 +03:00 committed by GitHub
commit e3870d5ce8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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