Skip to content

Commit

Permalink
bug fix
Browse files Browse the repository at this point in the history
修复了部分布局组合下view居中布局失效bug
  • Loading branch information
gsdios committed Jul 1, 2018
1 parent 84a4538 commit b76d0b7
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions SDAutoLayoutDemo/SDAutoLayout/UIView+SDAutoLayout.m
Original file line number Diff line number Diff line change
Expand Up @@ -1273,6 +1273,14 @@ - (void)sd_resizeWithModel:(SDAutoLayoutModel *)model

[self layoutBottomWithView:view model:model];

if ((model.centerX || model.equalCenterX) && !view.fixedWidth) {
[self layoutLeftWithView:view model:model];
}

if ((model.centerY || model.equalCenterY) && !view.fixedHeight) {
[self layoutTopWithView:view model:model];
}

if (view.sd_maxWidth) {
[self layoutAutoWidthWidthView:view model:model];
}
Expand Down

0 comments on commit b76d0b7

Please sign in to comment.