-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
iOS 10.3 :cell can not correctly calculate height #426
Comments
+1 |
We hope that Masonry can correctly calculate height in iOS 10.3, thx. @cloudkite @robertjpayne |
This problem also happened in my application. |
+1 |
2 similar comments
+1 |
+1 |
_titleLabel.preferredMaxLayoutWidth = [UIScreen mainScreen].bounds.size.width - 40; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Issue Description
In iOS 10.3,The following code is unable to correctly calculate height,
[_titleLabel mas_makeConstraints:^(MASConstraintMaker *make){
make.top.equalTo(cell.contentView.mas_top);
make.left.equalTo(cell.contentView.mas_left).offset(20.0);
make.right.equalTo(cell.contentView.mas_right).offset(-20.0);
make.bottom.equalTo(cell.contentView.mas_bottom).offset(-20.0);
}];
Add the following code, however, can correctly calculate the height
[cell.contentView mas_makeConstraints:^(MASConstraintMaker *make) {
make.edges.equalTo(cell);
}];
[_titleLabel mas_makeConstraints:^(MASConstraintMaker *make){
make.top.equalTo(cell.contentView.mas_top);
make.left.equalTo(cell.contentView.mas_left).offset(20.0);
make.right.equalTo(cell.contentView.mas_right).offset(-20.0);
make.bottom.equalTo(cell.contentView.mas_bottom).offset(-20.0);
}];
And,Masonry can correctly calculate the cell height before iOS 10.3
The text was updated successfully, but these errors were encountered: