Type Property

layerClass

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

Declaration

class var layerClass: AnyClass { get }

Return Value

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

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 method and return the CATiledLayer class.

This method is called only once early in the creation of the view in order to create the corresponding layer object.

See Also

Related Symbols

var layer: CALayer

The view’s Core Animation layer used for rendering.