ios - cocos2d unresponsive scene after opening for the second time -
i'm having issue going , forth between menu scene , preferences scene in cocos2d project. start in menu , when user clicks button takes them preferences scene.
[[ccdirector shareddirector] pushscene:[cctransitionslideinr transitionwithduration:.3 scene:prefscene]];
the preferences scene has button take user menu.
[[ccdirector shareddirector] popscene];
this works fine unless user exits preferences scene , tries go it. second time preferences scene opened of buttons animate when touched otherwise unresponsive.
thanks help!
i have had similar, there 2 solutions found:
quick , dirty create preferences scene instance need (lazy loading), reduce memory of keeping around unless need it, have initialize each time, should new clean copy each time, , if user doesn't click preferences every time faster load whole game.
make sure preferences scene cleans before disappears, means stop scheduled selectors or interval timers , remove delegates , touch events.
Comments
Post a Comment