---
title: layerClass
framework: uikit
role: symbol
role_heading: Type Property
path: uikit/uiview/layerclass
---

# layerClass

Returns the class used to create the layer for instances of this class.

## Declaration

```swift
class var layerClass: AnyClass { get }
```

## Return Value

Return Value The class used to create the view’s Core Animation layer.

## Discussion

Discussion This method returns the CALayer class object by default. Subclasses can override this method and return a different layer class as needed. For example, if your view uses tiling to display a large scrollable area, you might want to override this property and return the CATiledLayer class, as shown in the following code. override class var layerClass : AnyClass {    return CATiledLayer.self } This method is called only once early in the creation of the view in order to create the corresponding layer object.

## See Also

### Configuring a view’s visual appearance

- [backgroundColor](uikit/uiview/backgroundcolor.md)
- [isHidden](uikit/uiview/ishidden.md)
- [alpha](uikit/uiview/alpha.md)
- [isOpaque](uikit/uiview/isopaque.md)
- [tintColor](uikit/uiview/tintcolor.md)
- [tintAdjustmentMode](uikit/uiview/tintadjustmentmode-swift.property.md)
- [clipsToBounds](uikit/uiview/clipstobounds.md)
- [clearsContextBeforeDrawing](uikit/uiview/clearscontextbeforedrawing.md)
- [mask](uikit/uiview/mask.md)
- [layer](uikit/uiview/layer.md)
