I'm running into an issue now when exporting my cocos2d based games out of Xcode 4.3+.
While I'm not intending on including iPad Retina graphics with my game, it seems the game wants Retina iPad graphics and is now loading everything incorrectly on iPad Retina Only.
Is there a quick and simple way to disable iPad Retina images only when loading assets from a scale based UI?
Thanks!
So it was quite simple. Added this code to the AppDelegate.m File
if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad)
{
[director enableRetinaDisplay:NO];
} else {
[director enableRetinaDisplay:YES];
}
Boom. Hope this can help someone else as I didn't see any readily available solutions.
as of july 2015 this still works great. you just have to change it like this:
if ( [[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPad )
{
[director_ enableRetinaDisplay:NO];
} else {
if( ! [director_ enableRetinaDisplay:YES] )
}
来源:https://stackoverflow.com/questions/14422637/cocos2d-disabling-only-retina-ipad-graphics