commit
00de0cd809
|
|
@ -309,6 +309,14 @@ open class TableDirector: NSObject, UITableViewDataSource, UITableViewDelegate {
|
||||||
return indexPath
|
return indexPath
|
||||||
}
|
}
|
||||||
|
|
||||||
|
open func tableView(_ tableView: UITableView, willDeselectRowAt indexPath: IndexPath) -> IndexPath? {
|
||||||
|
if hasAction(.willDeselect, atIndexPath: indexPath) {
|
||||||
|
return invoke(action: .willDeselect, cell: tableView.cellForRow(at: indexPath), indexPath: indexPath) as? IndexPath
|
||||||
|
}
|
||||||
|
|
||||||
|
return indexPath
|
||||||
|
}
|
||||||
|
|
||||||
// MARK: - Row editing
|
// MARK: - Row editing
|
||||||
open func tableView(_ tableView: UITableView, canEditRowAt indexPath: IndexPath) -> Bool {
|
open func tableView(_ tableView: UITableView, canEditRowAt indexPath: IndexPath) -> Bool {
|
||||||
return sections[indexPath.section].rows[indexPath.row].isEditingAllowed(forIndexPath: indexPath)
|
return sections[indexPath.section].rows[indexPath.row].isEditingAllowed(forIndexPath: indexPath)
|
||||||
|
|
|
||||||
|
|
@ -69,6 +69,7 @@ public enum TableRowActionType {
|
||||||
case select
|
case select
|
||||||
case deselect
|
case deselect
|
||||||
case willSelect
|
case willSelect
|
||||||
|
case willDeselect
|
||||||
case willDisplay
|
case willDisplay
|
||||||
case didEndDisplaying
|
case didEndDisplaying
|
||||||
case shouldHighlight
|
case shouldHighlight
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue