Returns the class used to create the layer for instances of this class.
- iOS 2.0+
- Mac Catalyst 13.0+
- tvOS 9.0+
The class used to create the view’s Core Animation layer.
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
CATiled class, as shown in Listing 1.
This method is called only once early in the creation of the view in order to create the corresponding layer object.