Enumeration

NSViewLayerContentsRedrawPolicy

Constants that specify how layer resizing is handled when a view is layer-backed or layer-hosting. For more information, see the layerContentsRedrawPolicy property.

Declaration

typedef enum NSViewLayerContentsRedrawPolicy : NSInteger {
    ...
} NSViewLayerContentsRedrawPolicy;

Topics

Constants

NSViewLayerContentsRedrawNever

Leave the layer's contents alone. Never mark the layer as needing display, or draw the view's contents to the layer. This is how developer created layers (layer-hosting views) are treated.

NSViewLayerContentsRedrawOnSetNeedsDisplay

Any of the setNeedsDisplay methods sent to the view will cause the view redraw the affected layer parts by invoking the view's drawRect:, but neither the layer or the view are marked as needing display when the view's size changes.

NSViewLayerContentsRedrawDuringViewResize

Resize the view’s backing-layer and redraw the view to the layer when the view's size changes. If the resize is animated, AppKit will drive the resize animation itself and will do this resize and redraw at each step of the animation. Affected parts of the layer will also be redrawn when the view is marked as needing display. This mode is a superset of NSViewLayerContentsRedrawOnSetNeedsDisplay. This is the way that layer-backed views are currently treated.

NSViewLayerContentsRedrawBeforeViewResize

Resize the layer and redraw the view to the layer when the view's size changes. This will be done just once at the beginning of a resize animation, not at each frame of the animation. Affected parts of the layer will also be redrawn when the view is marked as needing display. This mode is a superset of NSViewLayerContentsRedrawOnSetNeedsDisplay.

NSViewLayerContentsRedrawCrossfade

Redraw the layer contents at the new size and crossfade from the old contents to the new contents. Use this in conjunction with the NSViewLayerContentsPlacement constants to get a nice crossfade animation for complex layer-backed views that cannot update correctly at each step of the animation.