问题
I have a problem in my application with cocos2d retina picture. When I run the application, the image retina is displayed, but it doesn't resize. Help me.
回答1:
First check the your application enabled or not.
if( ! [director_ enableRetinaDisplay:YES] )
Second your image naming like this:
[sharedFileUtils setiPhoneRetinaDisplaySuffix:@"-hd"]; // Default on iPhone RetinaDisplay is "-hd"
[sharedFileUtils setiPadSuffix:@"-ipad"]; // Default on iPad is "ipad"
[sharedFileUtils setiPadRetinaDisplaySuffix:@"-ipadhd"]; // Default on iPad RetinaDisplay is "-ipadhd"
image.png(normal - size is 320x480)
image-hd.png(retina - size is 640x960)
image-ipad.png(normal ipad - size is 1024x768)
image-ipadhd.png(ipad retina - size is 2048x1536)
回答2:
Please check apple documentation for Launch image (required for all apps).
As iPhone 5 comes with different screen resolution in iOS6-sdk.
All you need to do is create a splash file named as Default-568h@2x.png
with the resolution 1136x640
, and put it in your Resources/iphone folder.
If you are updating application from older sdk to newer sdk then check you plist file and option to launch image.
来源:https://stackoverflow.com/questions/13625914/cocos2d-my-image-retina-doesnt-resize