iOS Guides | Samples

UIKit.UIStackView Class

A UIView that holds a horizontal or vertical set of other UIView objects.

See Also: UIStackView

Syntax

[Foundation.Register("UIStackView", true)]
[ObjCRuntime.Introduced(ObjCRuntime.PlatformName.iOS, 9, 0, ObjCRuntime.PlatformArchitecture.None, null)]
public class UIStackView : UIView

Related content

Requirements

Namespace: UIKit
Assembly: Xamarin.iOS (in Xamarin.iOS.dll)
Assembly Versions: 0.0.0.0

The members of UIKit.UIStackView are listed below.

See Also: UIView

Public Constructors

Default constructor, initializes a new instance of this class.
Initializes the UIStackView with the specified frame.
A constructor that initializes the object from the data stored in the unarchiver object.
Initialized a UIStackView with initial contents set to views.

Protected Constructors

Constructor to call on derived classes to skip initialization and merely allocate the object.
A constructor used when creating managed representations of unmanaged objects; Called by the runtime.

Public Properties

AlignmentUIStackViewAlignment. Controls the alignment of subviews perpendicular to this UIStackView's UIStackView.Axis.
[read-only]
static
AppearanceUIStackView+UIStackViewAppearance. Strongly-typed property that returns the UIAppearance class for this class.
[read-only]
ArrangedSubviewsUIView[]. The subviews that this UIStackView holds.
AxisUILayoutConstraintAxis. Whether subviews are stacked horizontally or vertically.
BaselineRelativeArrangementBoolean. Whether the vertical spacing between subviews is measured from their baselines.
[read-only]
override
ClassHandleIntPtr. The handle for this class.
DistributionUIStackViewDistribution. How subviews are arranged along the UIStackView.Axis.
LayoutMarginsRelativeArrangementBoolean. Whether subviews are arranged relative to this UIStackView's UIView.LayoutMargin.
Spacingnfloat. Distance, in points, between subviews.

Public Methods

AddArrangedSubview(UIView)
Adds view to the UIView.Subviews of this UIStackView.
static
AppearanceWhenContainedIn(params Type[]) : UIStackView+UIStackViewAppearance
Returns a strongly typed UIAppearance for instances of this class when the view is hosted in the specified hierarchy.
static
GetAppearance(UITraitCollection) : UIStackView+UIStackViewAppearance
Returns an appearance proxy for the specified traits.
static
GetAppearance(UITraitCollection, params Type[]) : UIStackView+UIStackViewAppearance
Returns an appearance proxy for the specified traits.
static
GetAppearance<T>() : UIStackView+UIStackViewAppearance
Obtains the appearance proxy UIStackViewAppearance for the subclass of UIStackView.
static
GetAppearance<T>(UITraitCollection) : UIStackView+UIStackViewAppearance
Obtains the appearance proxy UIStackViewAppearance for the subclass of UIStackView.
InsertArrangedSubview(UIView, nuint)
Adds view to the stack at the specified stackIndex.
RemoveArrangedSubview(UIView)
Removes view from UIStackView.ArrangeSubviews.