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

# scale(by:duration:)

Creates an action that uniformly changes the scale factor of a node by a relative value.

## Declaration

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

## Parameters

- `scale`: The amount of change to make to all three components of the node’s scale.
- `sec`: The duration, in seconds, of the animation.

## Return Value

Return Value A new action object.

## Discussion

Discussion When the action executes, the node’s scale property animates to the new value. This action is reversible; the reverse is created as if the following code had been executed: [SCNAction scaleBy: -scale duration: sec];

## See Also

### Creating Actions That Change a Node’s Scale

- [scale(to:duration:)](scenekit/scnaction/scale(to:duration:).md)
