Function

UIGraphicsPushContext

Makes the specified graphics context the current context.

Declaration

void UIGraphicsPushContext(CGContextRef context);

Parameters

context

The graphics context to make the current context.

Discussion

You can use this function to save the previous graphics state and make the specified context the current context. You must balance calls to this function with matching calls to the UIGraphicsPopContext function.

This function may be called from any thread of your app.

See Also

Drawing Context Primitives

UIGraphicsGetCurrentContext

Returns the current graphics context.

UIGraphicsPopContext

Removes the current graphics context from the top of the stack, restoring the previous context.

UIGraphicsBeginImageContextWithOptions

Creates a bitmap-based graphics context with the specified options.

UIRectClip

Modifies the current clipping path by intersecting it with the specified rectangle.