<!--
{
  "availability" : [
    "iOS: 10.0.0 -",
    "iPadOS: 10.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.12.0 -",
    "tvOS: 10.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 3.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "SpriteKit",
  "identifier" : "/documentation/SpriteKit/SKAction/animate(withWarps:times:restore:)",
  "metadataVersion" : "0.1.0",
  "role" : "Type Method",
  "symbol" : {
    "kind" : "Type Method",
    "modules" : [
      "SpriteKit"
    ],
    "preciseIdentifier" : "c:objc(cs)SKAction(cm)animateWithWarps:times:restore:"
  },
  "title" : "animate(withWarps:times:restore:)"
}
-->

# animate(withWarps:times:restore:)

Creates an action to distort a node through a sequence of [`SKWarpGeometry`](/documentation/SpriteKit/SKWarpGeometry) objects.

```
class func animate(withWarps warps: [SKWarpGeometry], times: [NSNumber], restore: Bool) -> SKAction?
```

## Parameters

`warps`

The sequence of warps to apply to the node.

`times`

The times at which each warp distortion in the sequence should complete.

`restore`

A Boolean specifying whether to restore the original node’s warpGeometry from before the action.

## Return Value

A new action object.

## Discussion

The [`numberOfColumns`](/documentation/SpriteKit/SKWarpGeometryGrid/numberOfColumns) and [`numberOfRows`](/documentation/SpriteKit/SKWarpGeometryGrid/numberOfRows) in each geometry in the sequence should match.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)