Cocos2d Node not accepting Touches

54 views Asked by At

Cocos2d v3: I have a very strange problem. I have a dozen or so CCNodes that are acting like menus for my game. They take up just a small section of the center of the screen. To present one node I hide (node.visible = NO) all the other nodes. Two of the Nodes will have CCTableViews that the user can interact with such as scrolling and cell selection. Changes in one table with cause changes in the other tables data. I am using SpriteBuilder for the game. SpriteBuilder doesn't have CCTableView, so I have to create them programmatically.

So here is my problem. I cannot scroll one of my CCTableViews (lets call it tableA). The CCTableView (tableA) that is being created first doesn't scroll. The later CCTableView (tableB) does scroll, despite the same code being used for both CCTableViews. Now interestingly, if I try to scroll on tableA (which is the only visible node) tableB scrolled (even though it is invisible). Its very strange, but it does appear that my scrolling on tableA affects tableB, despite tableB being invisible. Does anyone know why this might be happening and how I can fix it.

1

There are 1 answers

0
Michael On BEST ANSWER

I've had this problem before make sure you are removing tableA from the parent node before you add tableB as a child. This seems to be a little quirk in Cocos2d.