I’ve created a custom UITableViewCell that includes a number of subviews. In most cases I want the controller for the UITableViewCell to handle the events. In one case I want the subview to simply pass on the event to the parent UITableViewCell which will cause it to invoke didSelectRowAtIndexPath on the assigned delegate.
To put it another way: I want the subview to become “event transparent” — I want events to pass over / through it and register with the underlying cell.
Any suggestions? In other languages I would raise an event. New to Objective-C and Cocoa and haven’t been able to google up an answer yet.
Thanks in advance.
Try setting your view’s
userInteractionEnabledproperty toNO.This will make it ignore all touch events, and then the views under it will be able to catch these events.