Instance Method

lockFocusIfCanDrawInContext:

Locks the focus to the view atomically if drawing can occur in the specified graphics context.

Declaration

- (BOOL)lockFocusIfCanDrawInContext:(NSGraphicsContext *)context;

Parameters

context

The graphics context in which drawing might occur. See the discussion for the implications of the type of context.

Return Value

YES if successful; otherwise, returns NO.

See Also

Focusing

- lockFocus

Locks the focus on the view, so subsequent commands take effect in the view’s window and coordinate system.

Deprecated
- lockFocusIfCanDraw

Locks the focus to the view atomically if the canDraw method returns YES and returns the value of canDraw.

Deprecated
- unlockFocus

Unlocks focus from the current view.

Deprecated
focusView

Returns the currently focused NSView object, or nil if there is none.