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.
There are two possible events when a table row is tapped: selecting the row 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:
// Tap on table Row
- (void) tableView: (UITableView *) tableView didSelectRowAtIndexPath: (NSIndexPath *) indexPath { ... }
// Tap on row accessory
- (void) tableView: (UITableView *) tableView accessoryButtonTappedForRowWithIndexPath: (NSIndexPath *) indexPath{ ... }
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With