UIView.SetNeedsLayout Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Sets whether subviews need to be rearranged before displaying.
[Foundation.Export("setNeedsLayout")]
public virtual void SetNeedsLayout ();
abstract member SetNeedsLayout : unit -> unit
override this.SetNeedsLayout : unit -> unit
- Attributes
Remarks
If the state of your view changes in response to some API calls, instead of changing the layout manually in response to the change, you should invoke this method which will flag the view for a layout. The layout event will then be processed the next time the main loop runs. By using this approach, you can coalesce multiple changes to the layout in a single pass.