Instance Method


Scales the sprite node to a specified size.


func scale(to size: CGSize)


This method works by setting the sprite node's xScale and yScale to achieve the specified size in its parent's coordinate space.

See Also

Setting a Sprite's Size and Position

Using the Anchor Point to Move a Sprite

Learn how the anchor point affects a sprite's position.

var size: CGSize

The dimensions of the sprite, in points.

var anchorPoint: CGPoint

Defines the point in the sprite that corresponds to the node’s position.