forkingdog / UITableView-FDTemplateLayoutCell

Template auto layout cell for automatically UITableViewCell height calculating
MIT License
9.93k stars 2.01k forks source link

cell里面的label有的自动计算高度后不掉文字,有的自动计算高度后掉文字,详情见图 #342

Open nqwl opened 6 years ago

nqwl commented 6 years ago

5669d77b-6ca3-4408-a7af-567ce87f9d7e

feonixsmj commented 6 years ago

我也有遇到,但是手动给text计算宽度约束,就正常了。

leyeye commented 6 years ago

我也刚遇到你这样的问题,是约束按照加了一行来计算高度的,没解决

leyeye commented 6 years ago

@feonixsmj 你给个截图外加代码看一下吗?多谢了!!

Kingzhijie commented 6 years ago

这个问题有解决的吗

405883074 commented 6 years ago

我也遇到了这样的问题,现在解决了嘛?

wolfcon commented 6 years ago

手动计算

Andy0570 commented 6 years ago

我也遇到这样的问题了,用的nib方式做的Auto Layout,上下左右的约束都加好了。有的cell会掉一两个字,有的就正常显示。请问你们是如何解决的?

GHeminghui commented 6 years ago

把Lable的Content Compression Reststance Priority 值加大就行(加大vertical方向的即可,水平方向不变)

CJaeson commented 6 years ago

同样遇到了这个问题,发现在iOS11上计算正常,11以下的系统高度计算有误,添加并设置self.label.preferredMaxLayoutWidth的最大布局宽度后计算正常。