美文网首页
UILable在iOS10.3系统高度无法自适应

UILable在iOS10.3系统高度无法自适应

作者: 码农小白 | 来源:发表于2017-07-21 16:00 被阅读8次

cellcontentView增加约束

[cell.contentView mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.mas_equalTo(0).priorityLow();
make.right.mas_equalTo(0).priorityLow();
}];

之后会发现label的间距出现了问题, 间距变大


这里写图片描述

只有正确设置文本内容的宽度preferredMaxLayoutWidth值,才显示正常.

GitHub文章链接1
GitHub文章链接2

相关文章

网友评论

      本文标题:UILable在iOS10.3系统高度无法自适应

      本文链接:https://www.haomeiwen.com/subject/fceekxtx.html