JaHelia JaHelia - 1 year ago 92
iOS Question

How to reach the current selected cell in didSelectRowAtIndexPath?

I want to change the accessory view type of a cell through the method: didSelectRowAtIndexPath , i.e. when a row is selected I want to change the accessory view type, can I do this inside that method ?

Answer Source

You can get the cell from didSelectRowAtIndexPath: method using the indexPath like this.

UITableViewCell *cell = [tableView cellForRowAtIndexPath:indexPath];
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download