Skip to content

Commit

Permalink
Use the UITableViewCell as the sourceView
Browse files Browse the repository at this point in the history
  • Loading branch information
scenee committed Sep 18, 2021
1 parent fca62af commit 83c9818
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,8 @@ extension DebugTableViewController: UITableViewDelegate {
func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
print("DebugTableViewController -- select row \(indexPath.row)")
guard let action = Command(rawValue: indexPath.row) else { return }
execute(command: action, sourceView: tableView)
let cell = tableView.cellForRow(at: indexPath)
execute(command: action, sourceView: cell ?? tableView)
}

func tableView(_ tableView: UITableView, editActionsForRowAt indexPath: IndexPath) -> [UITableViewRowAction]? {
Expand Down

0 comments on commit 83c9818

Please sign in to comment.