UIGraphics.GetCurrentContext Method

Definition

Returns the current graphics context.

public static CoreGraphics.CGContext GetCurrentContext();
public static CoreGraphics.CGContext? GetCurrentContext();
static member GetCurrentContext : unit -> CoreGraphics.CGContext

Returns

The current CGContext, or null if there is no current context.

Remarks

This returns the current graphics context (the context at the top of the stack). This is only valid after you have pushed a new graphics context with one of the methods in this class.

Developers can call this method from any thread.

Applies to