Modifier

Partager via


UIView.SetNeedsDisplay Method

Definition

Marks the view dirty and queues a redraw operation on it.

[Foundation.Export("setNeedsDisplay")]
public virtual void SetNeedsDisplay ();
abstract member SetNeedsDisplay : unit -> unit
override this.SetNeedsDisplay : unit -> unit
Attributes

Remarks

This method is invoked if the contents of the view need to be refreshed due to a change of state or geometry. Invoking this method will cause the Draw(CGRect) method to be invoked.

Alternatively you can use the SetNeedsDisplayInRect(CGRect) method to only mark a specific region of the view to be repainted.

Applies to