Skip to content

Commit b082bbf

Browse files
authored
Fix margin for ToRightOfCenterOf and BelowCenterOf
1 parent a91024b commit b082bbf

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Cirrious.FluentLayout/AdvancedFluentLayoutExtensions.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,13 +116,13 @@ public static FluentLayout ToLeftOfCenterOf(this UIView view, UIView previous, n
116116
view.Right().EqualTo().CenterXOf(previous).Minus(margin.GetValueOrDefault(0));
117117

118118
public static FluentLayout ToRightOfCenterOf(this UIView view, UIView previous, nfloat? margin = null) =>
119-
view.Left().EqualTo().CenterXOf(previous).Minus(margin.GetValueOrDefault(0));
119+
view.Left().EqualTo().CenterXOf(previous).Plus(margin.GetValueOrDefault(0));
120120

121121
public static FluentLayout AboveCenterOf(this UIView view, UIView previous, nfloat? margin = null) =>
122122
view.Bottom().EqualTo().CenterYOf(previous).Minus(margin.GetValueOrDefault(0));
123123

124124
public static FluentLayout BelowCenterOf(this UIView view, UIView previous, nfloat? margin = null) =>
125-
view.Top().EqualTo().CenterYOf(previous).Minus(margin.GetValueOrDefault(0));
125+
view.Top().EqualTo().CenterYOf(previous).Plus(margin.GetValueOrDefault(0));
126126

127127
public static IEnumerable<FluentLayout> FullWidthOf(this UIView view, UIView parent, nfloat? margin = null)
128128
{

0 commit comments

Comments
 (0)