I have code in my iOS project that changes the CCSprite texture via setTexture, for example:
[sprite setTexture:[[CCTextureCache sharedTextureCache] addImage:@"Circle.png"]];
However, the sizes of the CCSprite texture before and after the swap are different, and as a result, the Circle.png texture becomes cropped; stuck in the size of the original texture (as the circle grows).
How to resize after replacing a texture?
( Related but not helpful in resolving this issue )
source
share