I have some code to display a logo and then immediately switch in to the main scene, but it doesn't seem to work. Here's the code:
LogoView *logoLayer = [[[LogoView alloc] initWithAssets: assets] autorelease];
Scene *mainScene = [[Scene node] addChild: logoLayer];
[[Director sharedDirector] runWithScene: mainScene];
MainView *layer = [[[MainView alloc] initWithAssets: assets] autorelease];
Scene *s = [[Scene node] addChild: layer];
[[Director sharedDirector] replaceScene: [FadeTransition transitionWithDuration: 5.0f scene: s withColor: ccBLACK]];
LogoView and MainView are both subclasses of Layer. Anyway, when I run this code, it transitions from a full black screen to Scene s. If I comment out everything from MainView *layer down, it displays the first scene just fine, but obviously doesn't do the necessary transition.
What's going on here? Is Director not full starting to run the scene before I try to replace it? How can I fix this, if it is?