---
title: "scale(by:duration:)"
framework: spritekit
role: symbol
role_heading: Type Method
path: "spritekit/skaction/scale(by:duration:)"
---

# scale(by:duration:)

Creates an action that changes the x and y scale values of a node by a relative value.

## Declaration

```swift
class func scale(by scale: CGFloat, duration: TimeInterval) -> SKAction
```

## Parameters

- `scale`: The amount to add to the node’s x and y scale values.
- `duration`: The duration of the animation.

## Return Value

Return Value A new action object.

## Discussion

Discussion When the action executes, the node’s xScale and yScale properties are animated to the new value. This action is reversible; the reverse is created as if the following code is executed:

## See Also

### Animating the Scaling of a Node

- [scale(to:duration:)](spritekit/skaction/scale(to:duration:)-43bz6.md)
- [scale(to:duration:)](spritekit/skaction/scale(to:duration:)-1xyzs.md)
- [scaleX(by:y:duration:)](spritekit/skaction/scalex(by:y:duration:).md)
- [scaleX(to:y:duration:)](spritekit/skaction/scalex(to:y:duration:).md)
- [scaleX(to:duration:)](spritekit/skaction/scalex(to:duration:).md)
- [scaleY(to:duration:)](spritekit/skaction/scaley(to:duration:).md)
