0

I am working on an application, which uses cocos2D. It works very well, but I have a problem during some transitions. Sometimes, I get an error when I use:

[[CCDirector sharedDirector] replaceScene:[Menu scene]];

I get:

Unbalanced calls to begin/end appearance transitions for <MyViewController>

I see with this link that there is for example two same view controllers at the same time, or other things like this. I also see that I must use:

setAnimated:NO

to solve this problem. But I can't with a CCScene.

How could I fix this problem please?

Thanks for your help!

Additional code :

WillExit:^{
    // This code is called when exiting the portal                                
    [[NSUserDefaults standardUserDefaults] synchronize];
    [[NSNotificationCenter defaultCenter] removeObserver:self];
    [[CCDirector sharedDirector] replaceScene:[Menu scene]];
    //[[CCDirector sharedDirector].view setanimated:NO]; I try some things like this...
 }];
Community
  • 1
  • 1
user1833903
  • 187
  • 3
  • 16
  • Could you show some more code? Is it by any chance possible that oyu are trying to replace a scene, while another transition is in progress? – Losiowaty Jul 05 '14 at 09:37
  • It is hard to show some more code, because this problem appears when I exit from a download module. I add some code, look. That's why I would set animated to NO, to avoid this problem of transitions. – user1833903 Jul 05 '14 at 10:09

0 Answers0