Question

I have Default-568@2x.png 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 Default-568h@2x.png if you are using the iPhone 5?

Was it helpful?

Solution

I just added another if statement:

    if ([UIScreen mainScreen].bounds.size.height == 568.0) {
        background = [CCSprite spriteWithFile:@"Default-568h@2x.png"];
        background.rotation = 90;
    }
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top