Editar

Compartir a través de


NSLayoutConstraint.Create Method

Definition

Overloads

Create(NSObject, NSLayoutAttribute, NSLayoutRelation)

Static factory method to create a constraint based on a UIView, an T:NSLayoutAttribute, and an NSLayoutRelation.

Create(NSObject, NSLayoutAttribute, NSLayoutRelation, nfloat, nfloat)

Static factory method for creating a constraint.

Create(NSObject, NSLayoutAttribute, NSLayoutRelation, NSObject, NSLayoutAttribute, nfloat, nfloat)

Factory method for creating a constraint.

Create(INativeObject, NSLayoutAttribute, NSLayoutRelation, INativeObject, NSLayoutAttribute, nfloat, nfloat)

Factory method for creating a constraint.

Create(NSObject, NSLayoutAttribute, NSLayoutRelation)

Static factory method to create a constraint based on a UIView, an T:NSLayoutAttribute, and an NSLayoutRelation.

public static UIKit.NSLayoutConstraint Create (Foundation.NSObject view1, UIKit.NSLayoutAttribute attribute1, UIKit.NSLayoutRelation relation);
static member Create : Foundation.NSObject * UIKit.NSLayoutAttribute * UIKit.NSLayoutRelation -> UIKit.NSLayoutConstraint

Parameters

view1
NSObject
attribute1
NSLayoutAttribute
relation
NSLayoutRelation

Returns

Applies to

Create(NSObject, NSLayoutAttribute, NSLayoutRelation, nfloat, nfloat)

Static factory method for creating a constraint.

public static UIKit.NSLayoutConstraint Create (Foundation.NSObject view1, UIKit.NSLayoutAttribute attribute1, UIKit.NSLayoutRelation relation, nfloat multiplier, nfloat constant);
static member Create : Foundation.NSObject * UIKit.NSLayoutAttribute * UIKit.NSLayoutRelation * nfloat * nfloat -> UIKit.NSLayoutConstraint

Parameters

view1
NSObject
attribute1
NSLayoutAttribute
relation
NSLayoutRelation
multiplier
nfloat
constant
nfloat

Returns

Applies to

Create(NSObject, NSLayoutAttribute, NSLayoutRelation, NSObject, NSLayoutAttribute, nfloat, nfloat)

Factory method for creating a constraint.

public static UIKit.NSLayoutConstraint Create (Foundation.NSObject view1, UIKit.NSLayoutAttribute attribute1, UIKit.NSLayoutRelation relation, Foundation.NSObject view2, UIKit.NSLayoutAttribute attribute2, nfloat multiplier, nfloat constant);
static member Create : Foundation.NSObject * UIKit.NSLayoutAttribute * UIKit.NSLayoutRelation * Foundation.NSObject * UIKit.NSLayoutAttribute * nfloat * nfloat -> UIKit.NSLayoutConstraint

Parameters

view1
NSObject

First view in the constraint.

attribute1
NSLayoutAttribute

Attribute for the first view.

relation
NSLayoutRelation

Relationships between the view1 and the view2.

view2
NSObject

Second view in the constraint.

This parameter can be null.

This parameter can be null.

attribute2
NSLayoutAttribute

Attribute for the second view.

multiplier
nfloat

Multiplier applied to the second attribute.

constant
nfloat

Constants to add.

Returns

New constraint with the specified parameters.

Remarks

Creates a constraint relationship between the view1 and the view2 that satisfies the following linear equation:

attribute1 = multiplier x attribute2 + constant

<br>

Applies to

Create(INativeObject, NSLayoutAttribute, NSLayoutRelation, INativeObject, NSLayoutAttribute, nfloat, nfloat)

Factory method for creating a constraint.

[Foundation.Export("constraintWithItem:attribute:relatedBy:toItem:attribute:multiplier:constant:")]
public static UIKit.NSLayoutConstraint Create (ObjCRuntime.INativeObject view1, UIKit.NSLayoutAttribute attribute1, UIKit.NSLayoutRelation relation, ObjCRuntime.INativeObject view2, UIKit.NSLayoutAttribute attribute2, nfloat multiplier, nfloat constant);
static member Create : ObjCRuntime.INativeObject * UIKit.NSLayoutAttribute * UIKit.NSLayoutRelation * ObjCRuntime.INativeObject * UIKit.NSLayoutAttribute * nfloat * nfloat -> UIKit.NSLayoutConstraint

Parameters

view1
INativeObject

First view in the constraint.

attribute1
NSLayoutAttribute

Attribute for the first view.

relation
NSLayoutRelation

Relationships between the view1 and the view2.

view2
INativeObject

Second view in the constraint.

This parameter can be null.

This parameter can be null.

attribute2
NSLayoutAttribute

Attribute for the second view.

multiplier
nfloat

Multiplier applied to the second attribute.

constant
nfloat

Constants to add.

Returns

New constraint with the specified parameters.

Attributes

Remarks

Creates a constraint relationship between the view1 and the view2 that satisfies the following linear equation:

attribute1 = multiplier x attribute2 + constant

<br>

Applies to