When I try to call [CCTouchDispatcher sharedDispatcher];
, it shows an error that the class method sharedDispatcher is missing. I go to the .h file of CCTouchDispatcher and found that sharedDispatcher is really missing! I am using Cocos2D 2.0 beta2. Is it removed from this version? If so what should I use to replace it. (may be [[CCTouchDispatcher alloc] init]
)
Just found an answer here https://stackoverflow.com/a/9059809/467588. You have to use this instead...
[[CCDirector sharedDirector] touchDispatcher]
I will still post this question anyway because that one's title is not comprehensive and hard to search, or until its owner accept my edit :)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With