Hi,
I've been looking into how to set the size of a sprite after creation. I want to set the dimensions of a few square sprites individually, but only after I create them. I'm now thinking this might have to be done by scale, but I want to set their widths and heights separately, and choose actual pixel values (so I might choose to make one square into a 40 by 5 rectangle, like a floor panel in a game).
I couldn't see how to scale in both dimensions. If I could, I'd probably have created a method that takes the width and height and does a sort of reverse calculation using the sprite's contentSize and its scale.
I then discovered that you can use the anchor point to affect the way the sprite scales.
This whole process, though, sounds a bit lengthy just to resize a sprite on-screen. Is there an easier way?