Add willSelect action

This commit is contained in:
Alex Nikishin 2016-02-10 12:30:34 +03:00
parent a403def467
commit a7d53f793e
2 changed files with 6 additions and 0 deletions

View File

@ -157,6 +157,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)

View File

@ -31,6 +31,7 @@ public enum ActionType {
case click
case select
case deselect
case willSelect
case configure
case willDisplay
case shouldHighlight