Nov 142011
 

Tip:

Quick tip to swap out the image of a sprite that has already been initialized with an image.

CCSprite *sprite = [CCSprite spriteWithSpriteFrameName@"oldImage.png"];
[sprite setDisplayFrame:[[CCSpriteFrameCache sharedSpriteFrameCache] spriteFrameByName:@"newImage.png"]];
 Posted by at 6:04 pm