Merge pull request #94 from dmertsalov/master
Add accessoryButton action support
This commit is contained in:
commit
d6520346c3
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -80,6 +80,7 @@ public enum TableRowActionType {
|
|||
case canMove
|
||||
case canMoveTo
|
||||
case move
|
||||
case accessoryButtonTap
|
||||
case custom(String)
|
||||
|
||||
var key: String {
|
||||
|
|
|
|||
Loading…
Reference in New Issue