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

# sublayers

An array containing the layer’s sublayers.

## Declaration

```swift
var sublayers: [CALayer]? { get set }
```

## Discussion

Discussion The sublayers are listed in back to front order. The default value of this property is nil. Special Considerations When setting the sublayers property to an array populated with layer objects, each layer in the array must not already have a superlayer—that is, its superlayer property must currently be nil.

## See Also

### Managing the layer hierarchy

- [superlayer](quartzcore/calayer/superlayer.md)
- [addSublayer(_:)](quartzcore/calayer/addsublayer(_:).md)
- [removeFromSuperlayer()](quartzcore/calayer/removefromsuperlayer().md)
- [insertSublayer(_:at:)](quartzcore/calayer/insertsublayer(_:at:).md)
- [insertSublayer(_:below:)](quartzcore/calayer/insertsublayer(_:below:).md)
- [insertSublayer(_:above:)](quartzcore/calayer/insertsublayer(_:above:).md)
- [replaceSublayer(_:with:)](quartzcore/calayer/replacesublayer(_:with:).md)
