Next Page > Hide TOC

CATiledLayer Class Reference

Inherits from
Conforms to
Framework
/System/Library/Frameworks/QuartzCore.framework
Availability
Available in Mac OS X v10.5 and later.
Declared in
CATiledLayer.h
Companion guides
Related sample code

Overview

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.

Tasks

Visual Fade

Levels of Detail

Layer Tile Size

Properties

For more about Objective-C properties, see “Properties” in The Objective-C 2.0 Programming Language.

levelsOfDetail

The number of levels of detail maintained by this layer.

@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.)

Availability
Related Sample Code
Declared In
CATiledLayer.h

levelsOfDetailBias

The number of magnified levels of detail for this layer.

@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.

Availability
Related Sample Code
Declared In
CATiledLayer.h

tileSize

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

@property CGSize tileSize

Discussion

Defaults to (256.0, 256.0).

Availability
Declared In
CATiledLayer.h

Class Methods

fadeDuration

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

+ (CFTimeInterval)fadeDuration

Discussion

The default implementation returns 0.25 seconds.

Availability
Declared In
CATiledLayer.h

Next Page > Hide TOC


© 2007 Apple Inc. All Rights Reserved. (Last updated: 2007-07-24)


Did this document help you?
Yes: Tell us what works for you.
It’s good, but: Report typos, inaccuracies, and so forth.
It wasn’t helpful: Tell us what would have helped.