I have a piece of code in my iOS project that swaps the texture of a CCSprite via setTexture, like so:
[sprite setTexture:[[CCTextureCache sharedTextureCache] addImage:@"Circle.png"]];
However, the dimensions of the CCSprite’s texture before and after the swap are different, and as a result, the Circle.png texture is getting cropped; stuck at the size of original texture (as the circle is larger).
How can I adjust the size after swapping the Texture?
Try this: