Question

I have a table view with custom cells and I recognize swipes in that cells. That works just fine but I'd like the table view to behave normally. When I tap the wherever on the table view I'd like cell to get selected and perform action tableView:didSelectRowAtIndexPath:

Any tips or ideas?

Thanks.

Was it helpful?

Solution

I assume you are implementing the various UIResponder methods in your UITableView cell subclass. If you want the rest of the stack to continue processing the events you can just pass them on:

- (void) touchEnded:(UITouch *)touch withEvent:(UIEvent *)event {
   //do something with touch
   //...

   //pass the event to super which cause it to continue along the chain as
   //though you didn't do anything special with it
   [super touchEnded:touch withEvent:event];
}
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top