2018-08-19

图片.png

masonry布局 显示不下的。。。
make.width.mas_equalto(rect.size.width + 8).priority(888 - idx);

2018-08-19_第1张图片
tag过多会出问题
2018-08-19_第2张图片
修正

[_tagsView layoutIfNeeded];
if (CGRectGetMaxX(tagLable.frame) > _quotaLable.frame.origin.x) {
[tagLable mas_remakeConstraints:^(MASConstraintMaker *make) {
if (!_tagLable) {
make.left.mas_equalTo(0);
}else{
make.left.mas_equalTo(_tagLable.mas_right).offset(7);
}
make.right.mas_lessThanOrEqualTo(_quotaLable.mas_left);
make.width.mas_equalTo(tagRect.size.width + 8).priority(800-idx);
make.height.mas_equalTo(18);
make.top.mas_equalTo(0);
make.bottom.mas_equalTo(0);
}];
*stop = YES;
}

collectionview要想masonry撑开cell则需要设置estameitemsize

2018-08-19_第3张图片
图片.png

111

你可能感兴趣的:(2018-08-19)