John Smith
John Smith

Reputation: 12797

Determine whick part of the UITableView cell was tapped

Is there a way to determine where in the cell was tapped?

I am currently using tableView:didSelectRowAtIndexPath but this only tells me that the cell was selected.

Upvotes: 0

Views: 273

Answers (1)

Tim
Tim

Reputation: 60110

Override the UITableViewCell class, and in your table view's data source, return instances of your overridden class. Then, in the implementation for that class, override the UIResponder methods dealing with touch handling - you can get the exact point in the cell that received a touch, what kind of touch it was (single-tap, double-tap, etc.) as well as deal with drags and swipes separately.

Upvotes: 2

Related Questions