forkingdog / UITableView-FDTemplateLayoutCell

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

Cannot get a proper cell height (now 0) from '- systemFittingSize:'(AutoLayout) #274

Open OCer opened 7 years ago

OCer commented 7 years ago

20d478e6-386d-4d24-9651-06938f1b6983

代码如上,控制台老是打印 [FDTemplateLayoutCell] Warning once only: Cannot get a proper cell height (now 0) from '- systemFittingSize:'(AutoLayout). You should check how constraints are built in cell, making it into 'self-sizing' cell. 我的约束有问题?

JackWchen2015 commented 7 years ago

这个是警告,不是错误

OCer commented 7 years ago

我知道啊 可是为什么会有这个警告呢 我不知道该怎么消除这个警告

faimin commented 7 years ago

@OCer 你这个cell中的label内填充文字内容了吗?

OCer commented 7 years ago

默认是没有文本的啊,然后高度随着文本来确定 @faimin

JackWchen2015 commented 7 years ago

我也有这个提示,程序没出什么问题,就没管了....这个要看源码是怎么实现的

weekwood commented 7 years ago

@OCer when you create a cell programmatically or override initWithStyle method, you can move all the Auto Layout stuff to updateConstraints method it should avoid this issue.

liyouleo911 commented 7 years ago

Same issue here

weekwood commented 7 years ago

@liyouleo911 check #233 if your issue solved

ymsmile commented 7 years ago

Same issue here

PengfeiWang666 commented 7 years ago

Same issue here

lin86370921 commented 7 years ago

Same issue here

jingchangfa commented 7 years ago

同样的问题,楼主解决了么~ 同样想实现,高度随着文本来确定