UIView.Constraints プロパティ

定義

この UIViewの自動レイアウトで使用される制約。

[ObjCRuntime.Introduced(ObjCRuntime.PlatformName.iOS, 6, 0, ObjCRuntime.PlatformArchitecture.All, null)]
public virtual UIKit.NSLayoutConstraint[] Constraints { [Foundation.Export("constraints")] [ObjCRuntime.Introduced(ObjCRuntime.PlatformName.iOS, 6, 0, ObjCRuntime.PlatformArchitecture.All, null)] get; }
member this.Constraints : UIKit.NSLayoutConstraint[]

プロパティ値

既定値は空の配列です。

属性

注釈

自動レイアウトでは、 の UIViewConstraints使用してその をレイアウトSubviewsします。 これらの制約は、 または AddConstraints(NSLayoutConstraint[])AddConstraint(NSLayoutConstraint)設定されます。

P:UIKit.NSLayoutConstraint.DebugDescription プロパティは、自動レイアウトの問題のデバッグに役立ちます。

foreach(var c in mainView.Constraints)
{
    Console.WriteLine(c.DebugDescription);
}              

適用対象

こちらもご覧ください