iOS Developer Library

Developer

QuartzCore Framework Reference CATiledLayer Class Reference

Options
Deployment Target:

On This Page
Language:

CATiledLayer

Inheritance


Import Statement


Swift

import QuartzCore

Objective-C

@import QuartzCore;

Availability


Available in iOS 2.0 and later.

CATiledLayer is a subclass of CALayer providing a way to asynchronously provide tiles of the layer's content, potentially cached at multiple levels of detail.

As more data is required by the renderer, the layer's drawLayer:inContext: 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 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 setNeedsDisplayInRect: method however the update will be asynchronous. While the next display update will most likely not contain the updated content, a future update will.

  • The time, in seconds, that newly added images take to "fade-in" to the rendered representation of the tiled layer.

    Declaration

    Swift

    class func fadeDuration() -> CFTimeInterval

    Objective-C

    + (CFTimeInterval)fadeDuration

    Discussion

    The default implementation returns 0.25 seconds.

    Import Statement

    Objective-C

    @import QuartzCore;

    Swift

    import QuartzCore

    Availability

    Available in iOS 2.0 and later.

  • The number of levels of detail maintained by this layer.

    Declaration

    Swift

    var levelsOfDetail: Int

    Objective-C

    @property size_t levelsOfDetail

    Discussion

    Defaults to 1. Each level of detail is half the resolution of the previous level. If too many levels are specified for the current size of the layer, then the number of levels is clamped to the maximum value (the bottom most level of detail must contain at least a single pixel in each dimension.)

    Import Statement

    Objective-C

    @import QuartzCore;

    Swift

    import QuartzCore

    Availability

    Available in iOS 2.0 and later.

  • The number of magnified levels of detail for this layer.

    Declaration

    Swift

    var levelsOfDetailBias: Int

    Objective-C

    @property size_t levelsOfDetailBias

    Discussion

    Defaults to 0. Each previous level of detail is twice the resolution of the later. For example, specifying a value of 2 means that the layer has two extra levels of detail: 2x and 4x.

    Import Statement

    Objective-C

    @import QuartzCore;

    Swift

    import QuartzCore

    Availability

    Available in iOS 2.0 and later.

  • tileSize tileSize Property

    The maximum size of each tile used to create the layer's content.

    Declaration

    Swift

    var tileSize: CGSize

    Objective-C

    @property CGSize tileSize

    Discussion

    Defaults to (256.0, 256.0).

    Import Statement

    Objective-C

    @import QuartzCore;

    Swift

    import QuartzCore

    Availability

    Available in iOS 2.0 and later.