Masonry
Masonry copied to clipboard
iOS 10.3 :cell can not correctly calculate height
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
+1
We hope that Masonry can correctly calculate height in iOS 10.3, thx. @cloudkite @robertjpayne
This problem also happened in my application.
+1
+1
+1
_titleLabel.preferredMaxLayoutWidth = [UIScreen mainScreen].bounds.size.width - 40; fix it