0
\$\begingroup\$

I've surfed the internet for quite some time but haven't come to find an answer. Any help would be greatly appreciated. I am trying to perform a transition from a UIView to a CCScene So i have a class which is connected to a .xib file. I am able to present that scene using

[[CCDirector sharedDirector]replaceScene:[LevelSelect scene] withTransition:[CCTransition transitionCrossFadeWithDuration:1]];

But when i try to change to a CCScene which does not have a .xib file, it doesn't perform the transition, but plays the audio that is present in the next scene.

[[CCDirector sharedDirector]replaceScene:[Play sceneWithDifficulty:1]];

Thanks.

\$\endgroup\$
0
\$\begingroup\$

I found it, i was adding the view but not removing it.
So, even if the view was loading, it loaded under all the view.
Now before every transition, i remove the current xib view and then perform the transition.

[myXIBFile removeFromSuperView];

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.