/// <summary> /// A helper function that create a new constraint, add to parent view and return the parent constraint to continue the chain method. /// </summary> private ParentConstraint AddNewConstraint(UIView view, NSLayoutAttribute viewAttribute, NSLayoutRelation relation, NSObject target, NSLayoutAttribute targetAttribute, float multiplier, float constant, float priority) { // create a new constraint var constraint = NSLayoutConstraint.Create(view, viewAttribute, relation, target, targetAttribute, multiplier, constant); constraint.Priority = priority; // add the new constraint to parent Parent.AddConstraint(constraint); // continue the chain return(this); }