Skip to content

Commit

Permalink
Fixed logic around calculating the width of a view aligned to the lef…
Browse files Browse the repository at this point in the history
…t of another, filling the width of the superview.
  • Loading branch information
Mike Amaral committed Mar 29, 2016
1 parent f87def1 commit 27ed0e5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Facade/UIView+Facade.m
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ - (void)alignToTheLeftOf:(UIView *)view matchingCenterWithRightPadding:(CGFloat)
}

- (void)alignToTheLeftOf:(UIView *)view matchingCenterAndFillingWidthWithLeftAndRightPadding:(CGFloat)leftAndRight height:(CGFloat)height {
self.frame = CGRectMake(leftAndRight, CGRectGetMidY(view.frame) - (height / 2.0), CGRectGetMinX(view.frame) - (2 * leftAndRight), height);
self.frame = CGRectMake(leftAndRight, CGRectGetMidY(view.frame) - (height / 2.0), CGRectGetWidth(self.superview.frame) - (2 * leftAndRight) - (CGRectGetWidth(self.superview.frame) - CGRectGetMinX(view.frame)), height);
}

- (void)alignToTheLeftOf:(UIView *)view matchingBottomWithRightPadding:(CGFloat)right width:(CGFloat)width height:(CGFloat)height {
Expand Down

0 comments on commit 27ed0e5

Please sign in to comment.