diff --git a/SDAutoLayoutDemo/SDAutoLayout/UIView+SDAutoLayout.m b/SDAutoLayoutDemo/SDAutoLayout/UIView+SDAutoLayout.m index 62d20cb..8348dab 100755 --- a/SDAutoLayoutDemo/SDAutoLayout/UIView+SDAutoLayout.m +++ b/SDAutoLayoutDemo/SDAutoLayout/UIView+SDAutoLayout.m @@ -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]; }