Skip to content

Commit

Permalink
fix bug
Browse files Browse the repository at this point in the history
  • Loading branch information
lianchengjiang committed Apr 12, 2016
1 parent 1386ff3 commit 76dd408
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions LCUIKit/UIButton+LCAlignment.m
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,10 @@ - (void)lc_verticalAlignmentWithTitleTop:(BOOL)isTop space:(float)space ;
float rightInset = MIN(halfWidth, titleSize.width);

if (isTop) {
[self setTitleEdgeInsets:UIEdgeInsetsMake(-titleSize.height-space, - halfWidth, imageSize.height+space, halfWidth)];
[self setTitleEdgeInsets:UIEdgeInsetsMake(-halfHeight-space, - halfWidth, halfHeight+space, halfWidth)];
[self setContentEdgeInsets:UIEdgeInsetsMake(topInset+space, leftInset, -bottomInset, -rightInset)];
} else {
[self setTitleEdgeInsets:UIEdgeInsetsMake(imageSize.height+space, - halfWidth, -titleSize.height-space, halfWidth)];
[self setTitleEdgeInsets:UIEdgeInsetsMake(halfHeight+space, - halfWidth, -halfHeight-space, halfWidth)];
[self setContentEdgeInsets:UIEdgeInsetsMake(-bottomInset, leftInset, topInset+space, -rightInset)];
}
}
Expand Down

0 comments on commit 76dd408

Please sign in to comment.