Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

缩小控件高度的动画 控件会错位平移 #592

Open
diamondfive opened this issue Mar 25, 2021 · 0 comments
Open

缩小控件高度的动画 控件会错位平移 #592

diamondfive opened this issue Mar 25, 2021 · 0 comments

Comments

@diamondfive
Copy link

原始控件
[self.testLabel mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.mas_equalTo(10);
make.top.mas_equalTo(200);
make.width.mas_equalTo(200);
make.height.mas_equalTo(200);
}];
平移动画:
[UIView animateWithDuration:5.0f animations:^{

    [self.testLabel mas_updateConstraints:^(MASConstraintMaker *make) {

        make.height.mas_equalTo(100);
    }];
    
    [self.view layoutIfNeeded];
    [self.view.superview layoutIfNeeded];
}];

控件会错位平移

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant