iphone - Cocos2d Background image not showing properly on retina simulator and devices -
i have implemented below code in cocos2d showing background image , code working fine except in retina devices. background images not scaled or set properly. working fine on ipad 2 ios 6.0 not on retina ipad (3) 6.0 , retina simulators. have tried samples github , ray wonder -samples. codes have same issues. did face same kind of issue ?
ccsprite *bg ; bg = [ccsprite spritewithfile:@"gamebgipad1.png"]; bg.anchorpoint = cgpointzero; [self addchild:bg z:-2];
i have included below lines enable retina display , added image name "gamebgipad1-hd.png" showing black background on retina after adding below code:-
also included below code in app delegate:-
if( ! [director enableretinadisplay:yes] ) cclog(@"retina display not supported");
both images not part of sprite sheet placed in images folder.
cocos2d 1.0 : not supports ipad retina display.
cocos2d 2.0 : use below naming convention.
for ipad retina need put image extension -ipadhd.png
gamebg.png - iphone gamebg-hd.png - iphone hd gamebg-ipad.png - ipad gamebg-ipadhd.png - ipad hd gamebg-iphone5hd - iphone5
Comments
Post a Comment