CKAsyncLayer Class Reference
| Inherits from | CALayer |
|---|---|
| Declared in | CKAsyncLayer.h |
displayMode
@summary Controls the async display behavior of the layer.
@property (atomic, assign) CKAsyncLayerDisplayMode displayModeDiscussion
@default CKAsyncLayerDisplayModeDefault
Declared In
CKAsyncLayer.h
– drawParameters
@summary Captures parameters from the receiver on the main thread that will be passed to drawInContext:parameters: on a background queue. Override to capture values from any properties that are needed for drawing.
- (NSObject *)drawParametersReturn Value
The parameters.
Declared In
CKAsyncLayer.h
+ drawInContext:parameters:
@summary This method may be executed on a background queue to draw the contents of the layer.
+ (void)drawInContext:(CGContextRef)context parameters:(NSObject *)parametersParameters
context |
The graphics context in which to draw the content. |
|---|---|
parameters |
The captured parameters from drawParameters. |
Discussion
@desc Parameters needed for drawing must be captured in drawParameters in order to ensure that they are consistent for the drawing routine. Subsequent changes to the properties of the layer will require setNeedsDisplay to trigger another async display.
Declared In
CKAsyncLayer.h
– cancelAsyncDisplay
@summary Cancels any pending async display.
- (void)cancelAsyncDisplayDiscussion
@desc If the receiver has had display called and is waiting for the dispatched async display to be executed, this will cancel that dispatched async display. This method is useful to call when removing the receiver from the window.
Declared In
CKAsyncLayer.h
– setNeedsAsyncDisplay
If contents is nil, this is the same as -setNeedsDisplay. If -setNeedsDisplay is called for any other reason during the same pass, it overrides any calls to -setNeedsAsyncDisplay and results in the default behavior of -setNeedsDisplay.
- (void)setNeedsAsyncDisplayDiscussion
Otherwise, redisplays the layer in the following manner: - Redisplay is always asynchronous. - Parent transaction containers are ignored. - The existing contents are left in the layer instead of being cleared during async display.
This method can be used when the existing layer contents are valid, just out of date, so there is no need to clear contents or modify the parent transaction container.
Declared In
CKAsyncLayer.h