Bewerken

Delen via


CALayer.DrawInContext(CGContext) Method

Definition

Draws the layer on the specified context.

[Foundation.Export("drawInContext:")]
public virtual void DrawInContext (CoreGraphics.CGContext ctx);
abstract member DrawInContext : CoreGraphics.CGContext -> unit
override this.DrawInContext : CoreGraphics.CGContext -> unit

Parameters

ctx
CGContext

Prepared context to draw into.

Attributes

Remarks

Developers override this method to provide custom rendering of the contents of their instance of the CALayer. If this method is not overwritten, the CALayer will invoke the DrawLayer(CALayer, CGContext) method to render the contents.

The provided context has been preconfigured for the target surface as well as having a clipping region defined.

Applies to