iOSLayoutConstraint.Constructor(firstItem As Object, firstAttribute As AttributeTypes, relation As RelationTypes, secondItem As Object, secondAttribute As AttributeTypes, multiplier As Double, addend As Double, 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, addend As Double, priority As Double = 1000)

Creates a new auto-layout rule for the firstItem control with an addend 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.
addend The offset. If you need the StandardGap, 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 50 at the highest priority:

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