diff --git a/Sources/TableDirector.swift b/Sources/TableDirector.swift index e6f16c7..4a77708 100644 --- a/Sources/TableDirector.swift +++ b/Sources/TableDirector.swift @@ -355,6 +355,11 @@ open class TableDirector: NSObject, UITableViewDataSource, UITableViewDelegate { open func tableView(_ tableView: UITableView, moveRowAt sourceIndexPath: IndexPath, to destinationIndexPath: IndexPath) { invoke(action: .move, cell: tableView.cellForRow(at: sourceIndexPath), indexPath: sourceIndexPath, userInfo: [TableKitUserInfoKeys.CellMoveDestinationIndexPath: destinationIndexPath]) } + + open func tableView(_ tableView: UITableView, accessoryButtonTappedForRowWith indexPath: IndexPath) { + let cell = tableView.cellForRow(at: indexPath) + invoke(action: .accessoryButtonTap, cell: cell, indexPath: indexPath) + } } // MARK: - Sections manipulation diff --git a/Sources/TableKit.swift b/Sources/TableKit.swift index 3eb96a4..9202180 100644 --- a/Sources/TableKit.swift +++ b/Sources/TableKit.swift @@ -80,6 +80,7 @@ public enum TableRowActionType { case canMove case canMoveTo case move + case accessoryButtonTap case custom(String) var key: String {