---
title: borderWidth
framework: quartzcore
role: symbol
role_heading: Instance Property
path: quartzcore/calayer/borderwidth
---

# borderWidth

The width of the layer’s border. Animatable.

## Declaration

```swift
var borderWidth: CGFloat { get set }
```

## Discussion

Discussion When this value is greater than 0.0, the layer draws a border using the current borderColor value. The border is drawn inset from the receiver’s bounds by the value specified in this property. It is composited above the receiver’s contents and sublayers and includes the effects of the cornerRadius property. The default value of this property is 0.0.

## See Also

### Modifying the layer’s appearance

- [contentsGravity](quartzcore/calayer/contentsgravity.md)
- [Contents Gravity Values](quartzcore/contents-gravity-values.md)
- [opacity](quartzcore/calayer/opacity.md)
- [isHidden](quartzcore/calayer/ishidden.md)
- [masksToBounds](quartzcore/calayer/maskstobounds.md)
- [mask](quartzcore/calayer/mask.md)
- [isDoubleSided](quartzcore/calayer/isdoublesided.md)
- [cornerRadius](quartzcore/calayer/cornerradius.md)
- [maskedCorners](quartzcore/calayer/maskedcorners.md)
- [CACornerMask](quartzcore/cacornermask.md)
- [borderColor](quartzcore/calayer/bordercolor.md)
- [backgroundColor](quartzcore/calayer/backgroundcolor.md)
- [shadowOpacity](quartzcore/calayer/shadowopacity.md)
- [shadowRadius](quartzcore/calayer/shadowradius.md)
- [shadowOffset](quartzcore/calayer/shadowoffset.md)
