# How do I transition a cocos2d scene to a UiViewController?

My project is a cocos2d game project, but I added a UIViewController for the initial log in. The first scene is the splash logo, followed by the menu screen, but I need to pass to my UIViewController instead of my menu screen. I've tried lots of methods, but it keeps crashing.

-(id) init
{

if( (self=[super init] ))
{
CCSprite *sprBack = [CCSprite spriteWithFile:@"logo.png"];
[sprBack setPosition:ccp(SCREEN_WIDTH / 2, SCREEN_HEIGHT / 2)];

[self schedule:@selector(logoTimer:) interval:3];
}

return self;
}

-(void) logoTimer: (ccTime) dt
{

[[CCDirector sharedDirector] replaceScene:
}


My UIViewController is called LoginViewController. I need to pass a scene like this:

[[CCDirector sharedDirector] replaceScene:


I tried a lot of methods, but unfortunately, nothing will gives me the correct solution.

Itvis worth mentioning that LoginViewController is not a Node. I have tried that method, but it geta stuck at the logo scene, with no page transition taking place.

-(void) logoTimer: (ccTime) dt
{
UIViewController *cocos = [[LogoViewController alloc] init];