public static FluentLayout ToRightOf(this UIView view, UIView previous, nfloat? margin = null) { return view.Left().EqualTo().RightOf(previous).Plus(margin.GetValueOrDefault(DefaultMargin)); }
public static FluentLayout Above(this UIView view, UIView previous, nfloat? margin = null) { return view.Bottom().EqualTo().TopOf(previous).Minus(margin.GetValueOrDefault(DefaultMargin)); }
public static FluentLayout WithRelativeHeight(this UIView view, UIView previous, nfloat? scale = null) { return view.Height().EqualTo().HeightOf(previous).WithMultiplier(scale.GetValueOrDefault(DefaultScale)); }
public static FluentLayout Below(this UIView view, UIView previous, nfloat? margin = null) { return view.Top().EqualTo().BottomOf(previous).Plus(margin.GetValueOrDefault(DefaultMargin)); }
public static FluentLayout AtBottomOf(this UIView view, UIView parentView, nfloat? margin = null) { return view.Bottom().EqualTo().BottomOf(parentView).Minus(margin.GetValueOrDefault(DefaultMargin)); }
public static FluentLayout AtLeftOf(this UIView view, UIView parentView, nfloat? margin = null) { return view.Left().EqualTo().LeftOf(parentView).Plus(margin.GetValueOrDefault(DefaultMargin)); }
public static IEnumerable<FluentLayout> FullHeightOf(this UIView view, UIView parent, nfloat? margin = null) { var marginValue = margin.GetValueOrDefault(DefaultMargin); yield return view.Top().EqualTo().TopOf(parent).Plus(marginValue); yield return view.Bottom().EqualTo().BottomOf(parent).Minus(marginValue); }
public static IEnumerable<FluentLayout> FullWidthOf(this UIView view, UIView parent, nfloat? margin = null) { var marginValue = margin.GetValueOrDefault(DefaultMargin); yield return view.Left().EqualTo().LeftOf(parent).Plus(marginValue); yield return view.Right().EqualTo().RightOf(parent).Minus(marginValue); }