TSTableView icon indicating copy to clipboard operation
TSTableView copied to clipboard

How to get the clicked cell

Open alvinak opened this issue 11 years ago • 2 comments

Thanks for providing a wonderful TableView class. I am trying to use this class in one of our iOS App and there is a requirement for deleting a row by clicking on a particular cell(in my case, i have added a close button at the end each row). Kindly tell me, how is this possible?

Thanks and Regards, Alvin

alvinak avatar Sep 17 '13 07:09 alvinak

Hi Alvin, I think, that the best solution would be to store information about corresponding row in your close(remove) button: some unique row ID by which you can identify corresponding record in your data model and remove it...

Better choice would be to have row path directly (as NSIndexPath object) (like it's done in left side expanding panel), but the problem is that there is no public api which let you update these row paths when table was modified. I'll think about this issue.

Viacheslav-Radchenko avatar Sep 17 '13 08:09 Viacheslav-Radchenko

Thanks for the response. Kindly tell me, is there any way tI can get the Cell Index position from the delegate function:

  • (void)tableView:(TSTableView *)tableView didSelectRowAtPath:(NSIndexPath *)rowPath

alvinak avatar Sep 17 '13 10:09 alvinak