Why does iPhone 5 briefly fill out Letterboxing and display Default.png in Cocos2d?

I have Default-568@2x.png that loads normally.

However, (on the device itself) after it shows iPhone 5, then Default.png is displayed, in mailbox mode. Then it loads the header screen of 1136 Γ— 640 pixels - that’s fine and what it should do.

I am using Cocos2d HelloWorld default template. I have not changed anything in the plist anyway.

Any ideas?

Why download Default.png and how do you fix it?

Thanks.

In IntroLayer we have

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

This is why Default.png appears.

How do you show Default568h@2x.png if using iPhone 5?

+4
source share
1 answer

I added another if statement:

  if ([UIScreen mainScreen].bounds.size.height == 568.0) { background = [CCSprite spriteWithFile:@" Default-568h@2x.png "]; background.rotation = 90; } 
+5
source

Source: https://habr.com/ru/post/1439282/


All Articles