Why is iPhone 5 briefly Letterboxing and displaying Default.png in Cocos2d?

410 views Asked by At

I have [email protected] which loads fine.

However, (on the actual device) after it shows the iPhone 5 then displays Default.png, in letter box mode. It then loads the 1136 × 640 px Title Screen - which is fine and what it's supposed to do.

I'm using the default Cocos2d HelloWorld template. I haven't changed anything in the plist or otherwise.

Any ideas?

Why does it load the Default.png and how do you fix this?

Thanks.

In the IntroLayer we have

-(void) onEnter

    if( UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone ) {
    background = [CCSprite spriteWithFile:@"Default.png"];
    background.rotation = 90;
}

Which is why Default.png is showing up.

How do you keep showing [email protected] if you are using the iPhone 5?

1

There are 1 answers

0
The Learner On BEST ANSWER

I just added another if statement:

    if ([UIScreen mainScreen].bounds.size.height == 568.0) {
        background = [CCSprite spriteWithFile:@"[email protected]"];
        background.rotation = 90;
    }