---
title: layoutSublayers()
framework: quartzcore
role: symbol
role_heading: Instance Method
path: quartzcore/calayer/layoutsublayers()
---

# layoutSublayers()

Tells the layer to update its layout.

## Declaration

```swift
func layoutSublayers()
```

## Discussion

Discussion Subclasses can override this method and use it to implement their own layout algorithm. Your implementation must set the frame of each sublayer managed by the receiver. The default implementation of this method calls the layoutSublayers(of:) method in Swift or layoutSublayersOfLayer: method in Objective-C of the layer’s delegate object. If there is no delegate object, or the delegate does not implement that method, this method calls the layoutSublayers(of:) method in Swift or layoutSublayersOfLayer: method in Objective-C of the object in the layoutManager property.

## See Also

### Managing layer resizing and layout

- [layoutManager](quartzcore/calayer/layoutmanager.md)
- [setNeedsLayout()](quartzcore/calayer/setneedslayout().md)
- [layoutIfNeeded()](quartzcore/calayer/layoutifneeded().md)
- [needsLayout()](quartzcore/calayer/needslayout().md)
- [autoresizingMask](quartzcore/calayer/autoresizingmask.md)
- [resize(withOldSuperlayerSize:)](quartzcore/calayer/resize(witholdsuperlayersize:).md)
- [resizeSublayers(withOldSize:)](quartzcore/calayer/resizesublayers(witholdsize:).md)
- [preferredFrameSize()](quartzcore/calayer/preferredframesize().md)
