I believe this works:
-(void)resizeSprite:(CCSprite*)sprite toWidth:(float)width toHeight:(float)height { sprite.scaleX = width / sprite.contentSize.width; sprite.scaleY = height / sprite.contentSize.height; }
Put it in your game and use it like this:
[self resizeSprite:mySprite toWidth:350 toHeight:400]
Voldemort
source share