本文介绍了Cocos2D +仅禁用Retina iPad图形的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我现在遇到一个问题,当导出我的cocos2d基于Xcode 4.3 +的游戏。

I'm running into an issue now when exporting my cocos2d based games out of Xcode 4.3+.

虽然我不打算包括iPad Retina图形我的游戏,它似乎游戏想要Retina iPad显卡,现在正在加载一切不正确的iPad Retina只。

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.

有一个快速和简单的方法来禁用iPad Retina图像何时从基于规模的UI加载资源?

Is there a quick and simple way to disable iPad Retina images only when loading assets from a scale based UI?

谢谢!

推荐答案

所以这很简单。将此代码添加到AppDelegate.m文件中

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。希望这可以帮助别人,因为我没有看到任何现成的解决方案。

Boom. Hope this can help someone else as I didn't see any readily available solutions.

这篇关于Cocos2D +仅禁用Retina iPad图形的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-14 14:05