2

I've just begun cocos2d development on the iphone. An issue I'm having is that when I add a CCSprite to my scene, instead of it being transparent around the edges of the .png file, its showing up as white.

So for example, I define the CCSprite in my header file -

 CCSprite *foo;

Then when I initialise my scene -

  foo = [CCSprite spriteWithFile:@"foo.png"];

  [self addChild:player z:0 tag:1];

Is there anything wrong with this code?

Thanks for any help.

P.S. I have double checked my .png file in Photoshop and its correctly showing up as transparent where it should be.

aur1nko
  • 23
  • 2

1 Answers1

2

Check the bottom portion of this page:

http://www.cocos2d-iphone.org/wiki/doku.php/faq#my_png_doesn_t_look_like_in_photoshop

nithin
  • 2,457
  • 1
  • 30
  • 50
  • I am seeing this issue only with devices that have iOS 5.0 and higher ... images appear fine with iOS below 5. – jsherk May 31 '12 at 00:23