UIView.ClearsContextBeforeDrawing UIView.ClearsContextBeforeDrawing Property

Definition

Specifies that the drawing buffer be erased prior to calling DrawRect(CGRect, UIViewPrintFormatter)

[get: Foundation.Export("clearsContextBeforeDrawing")]
[set: Foundation.Export("setClearsContextBeforeDrawing:")]
public virtual bool ClearsContextBeforeDrawing { get; set; }
member this.ClearsContextBeforeDrawing : bool with get, set

Property Value

The default value is true.

Remarks

If this value is true, the receiver's Bounds are erased and set to transparent black before the receiver's DrawRect(CGRect, UIViewPrintFormatter) method is called.

If the application developer has written a highly optimized DrawRect(CGRect, UIViewPrintFormatter), this property can be set to false which may lead to a performance improvement.

Applies to