---
title: "sample(atTime:)"
framework: spritekit
role: symbol
role_heading: Instance Method
path: "spritekit/skkeyframesequence/sample(attime:)"
---

# sample(atTime:)

Calculates the sample at a particular time.

## Declaration

```swift
func sample(atTime time: CGFloat) -> Any?
```

## Parameters

- `time`: The time value to sample.

## Mentioned in

Using Keyframe Sequence to effect Custom Interpolation

## Return Value

Return Value An object that contains the interpolated sample. The class of this object matches the class of the values stored in the keyframe sequence — either an NSNumber or an SKColor.
