<!--
{
  "availability" : [
    "iOS: -",
    "iPadOS: -",
    "macCatalyst: -",
    "macOS: -",
    "tvOS: -",
    "visionOS: -",
    "watchOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "SpriteKit",
  "identifier" : "/documentation/SpriteKit/SKKeyframeSequence/init(keyframeValues:times:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "SpriteKit"
    ],
    "preciseIdentifier" : "c:objc(cs)SKKeyframeSequence(im)initWithKeyframeValues:times:"
  },
  "title" : "init(keyframeValues:times:)"
}
-->

# init(keyframeValues:times:)

Initializes a keyframe sequence with an initial set of values and times.

```
init(keyframeValues values: [Any], times: [NSNumber])
```

## Parameters

`values`

An array of value objects that define the keyframe values for the sequence.

`times`

An array of <doc://com.apple.documentation/documentation/Foundation/NSNumber> objects containing floating-point values that specify the time values for the keyframes.

## Return Value

A newly initialized sequence.

## Discussion

The two arrays must have an identical number of elements. The keyframes in the new sequence are stored in the same order as the input arrays.

---

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)