Added support for moving rows

This commit is contained in:
Matias Rojas 2018-03-13 00:43:00 +03:00
parent 709f739ab6
commit fd50b732c9
2 changed files with 5 additions and 2 deletions

View File

@ -275,7 +275,7 @@ 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: [TableKitNotifications.CellMoveDestinationIndexPath: destinationIndexPath])
invoke(action: .move, cell: tableView.cellForRow(at: sourceIndexPath), indexPath: sourceIndexPath, userInfo: [TableKitUserInfoKeys.CellMoveDestinationIndexPath: destinationIndexPath])
}
}

View File

@ -22,7 +22,10 @@ import UIKit
struct TableKitNotifications {
static let CellAction = "TableKitNotificationsCellAction"
static let CellMoveDestinationIndexPath = "TableKitCellMoveDestinationIndexPath"
}
public struct TableKitUserInfoKeys {
public static let CellMoveDestinationIndexPath = "TableKitCellMoveDestinationIndexPath"
}
public protocol RowConfigurable {