Click and dblclick events problem in child views
If I add a click event to a parent view, then remove the event, the click or dblclick events of the children views no longer fires. I even tried to add the click or dblclick event again to the children, it still does not get fired.
Seems like as soon as I add a click event to the parent, the children's event handling is messed up, even if I remove the parent event dynamically. Does anyone has the same problem? Any work around? I'm using the iphone emulator.
1 Answer
-
Wow, this was tricky, but figured it out…
If you disable click event from the parent view, all click or dblclick events of the children views will be disabled. Therefore, if you want the children to have dblclick event, you have to have at least add back a dblclick event that does nothing in the parent view for them to work.