//设置位置
CGSize size=[cell.nameLbl sizeThatFits:CGSizeMake(cell.nameLbl.frame.size.width, MAXFLOAT)];
cell.nameLblWidthConstraint.constant = size.width + 10;
[cell setNeedsUpdateConstraints];
[cell layoutIfNeeded];
IOS auto layout label自适应长度
最新推荐文章于 2021-09-21 13:44:30 发布