diff --git a/Demo/Classes/Presentation/Controllers/MainController.swift b/Demo/Classes/Presentation/Controllers/MainController.swift index d2b4cab..b5c4881 100644 --- a/Demo/Classes/Presentation/Controllers/MainController.swift +++ b/Demo/Classes/Presentation/Controllers/MainController.swift @@ -41,6 +41,10 @@ class MainController: UIViewController { row1 .addAction(TableRowAction(.shouldHighlight) { (data) -> Bool in + data.cell + data.item + data.path + print("1") return false diff --git a/README.md b/README.md index c3c8d7e..ab571c6 100644 --- a/README.md +++ b/README.md @@ -64,6 +64,10 @@ It nice to have some actions that related to your cells: ```swift let action = TableRowAction(.click) { (data) in + // you could access any useful information that relates to the action + // data.cell - StringTableViewCell? + // data.item - String + // data.path - NSIndexPath } let row = TableRow(item: "some", actions: [action]) @@ -113,7 +117,7 @@ use_frameworks! pod 'TableKit' ``` #### Carthage -Add the line `github "maxsokolov/tablekit"` to your `Cartfile` +Add the line `github "maxsokolov/tablekit"` to your `Cartfile`. #### Manual Clone the repo and drag files from `Sources` folder into your Xcode project.