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

来源:互联网 发布:淘宝秒杀技巧软件 编辑:程序博客网 时间:2024/06/07 10:24

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

0 0