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

# addKeyframeValue(_:time:)

Adds a keyframe to the sequence.

```
func addKeyframeValue(_ value: Any, time: CGFloat)
```

## Parameters

`value`

An object that defines the value to add. It must have the same class as other value objects stored in the sequence.

`time`

The corresponding time.

## Discussion

The new keyframe is appended to the end of the array.

---

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)