cocos2d - Changing the image of a CCSprite
CCTexture2D* tex = [[CCTextureCache sharedTextureCache] addImage:@"new_image_name"]; [spriteWant2Change setTexture: tex];
what to do if texture is different in size from previous one ?
If the sprites are of different size then you will need to do this after calling setTexture function
[spriteWant2Change setTextureRect:CGRectMake(0, 0, tex.contentSize.width, tex.contentSize.height)];