How to reach the current selected cell in didSelectRowAtIndexPath?

You can get the cell from didSelectRowAtIndexPath: method using the indexPath, like this UITableViewCell *cell = tableView cellForRowAtIndexPath:indexPath.

You can get the cell from didSelectRowAtIndexPath: method using the indexPath, like this. UITableViewCell *cell = tableView cellForRowAtIndexPath:indexPath.

– EmptyStack Jul 1 at 11:45 I think you have to save the indexpath somehow and then set the accessoryView in cellForRowAtIndexPath. Otherwise its overwritten everytime the tableview asks the delegate for the cells. – Tobi Jul 1 at 11:45 @JaHelia, Yes.

You should do as @Tobi mentioned above, to make the cell show the accessory view even after you reload the table view – EmptyStack Jul 1 at 11:47 @EmptyStack & @Tobi: thank you for your kind response ... – JaHelia Jul 1 at 14:25.

(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath; { UITableViewCell *myCell = tableView cellForRowAtIndexPath:indexPath; // Access accessory View as below. UIView * myCellAccessoryView = myCell. AccessoryView; }.

Use the below function and pass the index path of the selected row so that the particular cell is reloaded again. - (void)reloadRowsAtIndexPaths:(NSArray *)indexPaths withRowAnimation:(UITableViewRowAnimation)animation Another solution: store the selected row index and do a reload of tableview. Then in cellForRowAtIndexPath check for the selected row and change the accessory view of the cell.

Use the below function and pass the index path of the selected row so that the particular cell is reloaded again. Another solution: store the selected row index and do a reload of tableview. Then in cellForRowAtIndexPath check for the selected row and change the accessory view of the cell.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions