Add accessoryButton action support
This commit is contained in:
parent
00de0cd809
commit
959032a03f
|
|
@ -355,6 +355,11 @@ open class TableDirector: NSObject, UITableViewDataSource, UITableViewDelegate {
|
||||||
open func tableView(_ tableView: UITableView, moveRowAt sourceIndexPath: IndexPath, to destinationIndexPath: IndexPath) {
|
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])
|
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
|
// MARK: - Sections manipulation
|
||||||
|
|
|
||||||
|
|
@ -80,6 +80,7 @@ public enum TableRowActionType {
|
||||||
case canMove
|
case canMove
|
||||||
case canMoveTo
|
case canMoveTo
|
||||||
case move
|
case move
|
||||||
|
case accessoryButtonTap
|
||||||
case custom(String)
|
case custom(String)
|
||||||
|
|
||||||
var key: String {
|
var key: String {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue