diff --git a/Tablet/TableDirector.swift b/Tablet/TableDirector.swift index fe20c63..bdec698 100644 --- a/Tablet/TableDirector.swift +++ b/Tablet/TableDirector.swift @@ -166,6 +166,11 @@ public extension TableDirector { return invokeAction(.height, cell: nil, indexPath: indexPath) as? CGFloat ?? UITableViewAutomaticDimension } + func tableView(tableView: UITableView, willSelectRowAtIndexPath indexPath: NSIndexPath) -> NSIndexPath? { + + return invokeAction(.willSelect, cell: tableView.cellForRowAtIndexPath(indexPath), indexPath: indexPath) as? NSIndexPath ?? indexPath + } + func tableView(tableView: UITableView, didSelectRowAtIndexPath indexPath: NSIndexPath) { let cell = tableView.cellForRowAtIndexPath(indexPath) diff --git a/Tablet/Tablet.swift b/Tablet/Tablet.swift index 3eadbfb..ac0e9a0 100644 --- a/Tablet/Tablet.swift +++ b/Tablet/Tablet.swift @@ -31,6 +31,7 @@ public enum ActionType { case click case select case deselect + case willSelect case configure case willDisplay case shouldHighlight diff --git a/TabletDemo/TabletDemo.xcodeproj/project.xcworkspace/xcuserdata/max.xcuserdatad/UserInterfaceState.xcuserstate b/TabletDemo/TabletDemo.xcodeproj/project.xcworkspace/xcuserdata/max.xcuserdatad/UserInterfaceState.xcuserstate index 4f0dc39..dc4bb6a 100644 Binary files a/TabletDemo/TabletDemo.xcodeproj/project.xcworkspace/xcuserdata/max.xcuserdatad/UserInterfaceState.xcuserstate and b/TabletDemo/TabletDemo.xcodeproj/project.xcworkspace/xcuserdata/max.xcuserdatad/UserInterfaceState.xcuserstate differ