iOSLayoutConstraint.Constructor(firstItem As Object, firstAttribute As AttributeTypes, relation As RelationTypes, secondItem As Object, secondAttribute As AttributeTypes, multiplier As Double, gap As StandardGap, priority As Double = 1000)

From Xojo Documentation

Constructor
iOSLayoutConstraint.Constructor(firstItem As Object, firstAttribute As AttributeTypes, relation As RelationTypes, secondItem As Object, secondAttribute As AttributeTypes, multiplier As Double, gap As StandardGap, priority As Double = 1000)

Creates a new auto-layout rule for the firstItem control with a StandardGap offset value.

Parameters

Parameter Description
firstItem The Control to add the constraint to.
firstAttribute The attribute of the control to constrain.
relation The relationship to the secondItem's attribute. Typically this is RelationTypes.Equal
secondItem The related control or containing view. This can also be the TopLayoutGuide or BottomLayoutGuide of the View.
secondAttribute The attribute of the related item to use.
multiplier A multiplier to adjust the secondAttribute value. Typically this is just 1.0.
gap Always iOSLayoutConstraint.StandardGap. If you need specific offset, use the alternative Constructor.
priority Values:
  • low = 200
  • medium = 400
  • medium-high = 600
  • high = 800
  • highest = 1000

Sample Code

Adds a right constraint to a TextField with an offset of the StandardGap at the highest priority:

// RightConstraintField.Right = Self.Right + StdGap
Var right As New iOSLayoutConstraint(RightConstraintField, _
iOSLayoutConstraint.AttributeTypes.Right, _
iOSLayoutConstraint.RelationTypes.Equal, _
Self, iOSLayoutConstraint.AttributeTypes.Right, _
1.0, iOSLayoutConstraint.StandardGap, 1000)