<!--
{
  "availability" : [
    "iOS: 2.0.0 -",
    "iPadOS: 2.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.5.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "QuartzCore",
  "identifier" : "/documentation/QuartzCore/CAKeyframeAnimation/path",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "Core Animation"
    ],
    "preciseIdentifier" : "c:objc(cs)CAKeyframeAnimation(py)path"
  },
  "title" : "path"
}
-->

# path

The path for a point-based property to follow.

```
var path: CGPath? { get set }
```

## Discussion

For layer properties that contain a <doc://com.apple.documentation/documentation/CoreFoundation/CGPoint> data type, the path object you assign to this property defines the values for that property over the length of the animation. If you specify a value for this property, any data in the [`values`](/documentation/QuartzCore/CAKeyframeAnimation/values) property is ignored.

Any timing values you specify for the animation are applied to the points used to create the path. Paths can contain points defining move-to, line-to, or curve-to segments. The end point of a line-to or curve-to segment defines the keyframe value. All other points between that end value and the previous value are then interpolated. Move-to segments do not define separate keyframe values.

How the animation proceeds along the path is dependent on the value in the [`calculationMode`](/documentation/QuartzCore/CAKeyframeAnimation/calculationMode) property. To achieve a smooth, constant velocity animation along the path, set the [`calculationMode`](/documentation/QuartzCore/CAKeyframeAnimation/calculationMode) property to [`paced`](/documentation/QuartzCore/CAAnimationCalculationMode/paced) or [`cubicPaced`](/documentation/QuartzCore/CAAnimationCalculationMode/cubicPaced). To create an animation where the location value jumps from keyframe point to keyframe point (without interpolation in between), use the [`discrete`](/documentation/QuartzCore/CAAnimationCalculationMode/discrete) value. To animate along the path by interpolating values between points, use the [`linear`](/documentation/QuartzCore/CAAnimationCalculationMode/linear) value.

## See Also

[`rotationMode`](/documentation/QuartzCore/CAKeyframeAnimation/rotationMode)

Determines whether objects animating along the path rotate to match the path tangent.



---

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)