A layer that provides a way to asynchronously provide tiles of the layer's content, potentially cached at multiple levels of detail.
SDKs
- iOS 2.0+
- macOS 10.5+
- Mac Catalyst 13.0+
- tvOS 9.0+
Framework
- Core Animation
Declaration
class CATiledLayer : CALayer
Overview
As more data is required by the renderer, the layer's draw(in:)
method is called on one or more background threads to supply the drawing operations to fill in one tile of data. The clip bounds and current transformation matrix (CTM) of the drawing context can be used to determine the bounds and resolution of the tile being requested.
Regions of the layer may be invalidated using the set
method however the update will be asynchronous. While the next display update will most likely not contain the updated content, a future update will.
Important
Do not attempt to directly modify the contents
property of a CATiled
object. Doing so disables the ability of a tiled layer to asynchronously provide tiled content, effectively turning the layer into a regular CALayer
object.