Instance Method

useOptimizedDrawing:

Specifies whether the window is to optimize focusing and drawing when displaying its views.

Declaration

- (void)useOptimizedDrawing:(BOOL)flag;

Parameters

flag

If YES, the window will optimize focusing and drawing for its views; if NO, it will not, in which case, the window does not preserve the Z-ordering of overlapping views when an object explicitly sends lockFocus to a view and draws directly to it, instead of using the AppKit standard display mechanism.

Discussion

The optimizations may prevent sibling subviews from being displayed in the correct order—which matters only if the subviews overlap. You should always set flag to YES when there are no overlapping subviews within the window. The default is NO.

See Also

Drawing Windows

- display

Passes a display message down the window’s view hierarchy, thus redrawing all views within the window, including the frame view that draws the border, title bar, and other peripheral elements.

- displayIfNeeded

Passes a displayIfNeeded message down the window’s view hierarchy, thus redrawing all views that need to be displayed, including the frame view that draws the border, title bar, and other peripheral elements.

viewsNeedDisplay

A Boolean value that indicates whether any of the window’s views need to be displayed.

autodisplay

A Boolean value that indicates whether the window automatically displays views that need to be displayed.

Deprecated
graphicsContext

The graphics context associated with the window for the current thread.

Deprecated
allowsConcurrentViewDrawing

A Boolean value that indicates whether the window allows multithreaded view drawing.