From fd50b732c9c971e2c4b76f51a44cf5939a1c2d49 Mon Sep 17 00:00:00 2001 From: Matias Rojas Date: Tue, 13 Mar 2018 00:43:00 +0300 Subject: [PATCH] Added support for moving rows --- Sources/TableDirector.swift | 2 +- Sources/TableKit.swift | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/Sources/TableDirector.swift b/Sources/TableDirector.swift index 1da8ae8..ea20fd1 100644 --- a/Sources/TableDirector.swift +++ b/Sources/TableDirector.swift @@ -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]) } } diff --git a/Sources/TableKit.swift b/Sources/TableKit.swift index 6bab9c8..96a2e48 100644 --- a/Sources/TableKit.swift +++ b/Sources/TableKit.swift @@ -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 {