cocos2d my image retina doesn't resize [closed]

牧云@^-^@ 提交于 2020-01-07 09:22:44

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!