internal LayoutConstraint AddConstraint(IProperty from, LayoutSupport to, Coefficients coefficients = null, NSLayoutRelation relation = default(NSLayoutRelation)) { if (coefficients == null) { coefficients = new Coefficients(); } from.View.TranslatesAutoresizingMaskIntoConstraints = false; var constraint = NSLayoutConstraint.Create( from.View, from.Attribute, relation, to.LayoutGuide, to.Attribute, coefficients.Multiplier, coefficients.Constant ); var view = from.View; while (view?.Superview != null) { view = view.Superview; } _constraints.Add(new Constraint(view, constraint)); return(constraint); }
public LayoutConstraint Equal(LayoutSupport support) { return(Context.AddConstraint(this, to: support)); }
public LayoutConstraint GreaterThanOrEqualTo(LayoutSupport support) { return(Context.AddConstraint(this, to: support, relation: NSLayoutRelation.GreaterThanOrEqual)); }