Search code examples
iosobjective-ccocos2d-iphonetouches

ccTouchesBegan not called


I'm trying to implement ccTouchesBegan in my GameScene.

I've set isTouchEnabled = YES. I'm also calling addStandardDelegate on the touchDispatcher. Finally, in my AppDelegate i have [glView setMultipleTouchEnabled:YES].

However, ccTouchesBegan is never called.

What am I doing wrong?


Solution

  • Solved it!

    I was registering touches on a previous layer, but the layer wasn't being dealloced because you have to "un-register" with the onExit method.

    Long story short: touchesBegan was not being called on my GameLayer because it was being swallowed by another layer.