views:

534

answers:

2

I've been googling around to try to figure out what sort of event handles are called when one row (or cell) in a UITableView is tapped, but haven't been able to figure it out. I'm trying to change the image property of the cell when it's tapped.

Thanks.

+3  A: 

There are two possible events when a table row is tapped. Selecting the rwo and the Accessory View (Usually the "more details" type action.

As long as you have registered a delegate for the UITableView, the following can be implemented and will be called on a touch:

Table Row: - (void) tableView: (UITableView *) tableView didSelectRowAtIndexPath: (NSIndexPath *) indexPath { ... }

Accessory Touch: - (void) tableView: (UITableView *) tableView accessoryButtonTappedForRowWithIndexPath: (NSIndexPath *) indexPath{ ... }

MystikSpiral
+1: `didSelectRowAtIndexPath` is the method I typically override to implement row-tapping recognition.
Ben S
That worked! Thanks.
Arman
A: 

Hi Friends,

I need to create a tableView with customized UITableViewCell that has three small buttons in their view. Is there any way by which I can trap the click events of Buttons as well as didSelectRow of TableView and decide what to do?

Please help me.

Krishnan
Ask it as a separate question
Vladimir