I have been working for an iPad game using Cocos2d 2.0, I am facing a problem while loading HD images for the new iPad (Retina Display). But I can't figure out why HD images are not being loaded automatically while executing the code:
Even after adding [director enableRetinaDisplay:YES];
it is still not working. Here is the code sample of when loading image :
MainBG = [CCSprite spriteWithFile:@"menuBackground-ipad.png"];
CGSize ScreenSize = [[CCDirector sharedDirector]winSize];
MainBG.position = ccp(ScreenSize.height/2,ScreenSize.width/2);
[self addChild:MainBG z:0];
I have another image menuBackground-ipadhd.png in the project resources (I can see it from Xcode as well).
Anyone can help ?