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

# lineCap

Specifies the line cap style for the shape’s path.

```
var lineCap: CAShapeLayerLineCap { get set }
```

## Discussion

The line cap style specifies the shape of the endpoints of an open path when stroked. The supported values are described in [Line Cap Values](/documentation/QuartzCore/line-cap-values). The following figure shows the appearance of the available line cap styles.

![](images/com.apple.quartzcore/media-1965770.gif)

The default is [`butt`](/documentation/QuartzCore/CAShapeLayerLineCap/butt).

---

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)