Edit

Share via


UIView.Subviews Property

Definition

An array of UIViews that are contained within this UIView.

public virtual UIKit.UIView[] Subviews { [Foundation.Export("subviews", ObjCRuntime.ArgumentSemantic.Copy)] get; }
member this.Subviews : UIKit.UIView[]

Property Value

UIView[]

The default value is an empty array.

Attributes

Remarks

This property defines the view hierarchy of a UIView. The complete view hierarchy includes the UIView's Superview and the descendent UIViews that are Subviewss of Subviewss, but the methods for manipulating the hierarchy are focused on manipulating subviews (e.g., AddSubview(UIView), InsertSubview(UIView, nint), etc.).

The position of a UIView in the Subviews array determines that UIView's z-order among the subviews. The UIView at index 0 is the rear-most view. UIViews can be initialized in a desired z-order by using InsertSubviewAbove(UIView, UIView) and InsertSubviewBelow(UIView, UIView). UIViews can be brought forward or sent backward in z-order by using ExchangeSubview(nint, nint).

Application developers should not manipulate or modify Subviews of framework-supplied UIViews, as they may change without notice in system updates.

Applies to

See also