iOS 8 中的自调整单元格和动态类型不调整大小

Self Sizing Cells and Dynamic Type in iOS 8 Doesn't resize

我对 iOS 8 个自动调整单元格有疑问。 我正在尝试使用此 AppCoda Tutorial.

创建自调整单元格

根据本教程,我已经初始化了我的 table 视图:

[self.tableView registerNib:[UINib nibWithNibName:[Cell1 description] bundle:[NSBundle mainBundle]] forCellReuseIdentifier:Cell1Identifier];
[self.tableView registerNib:[UINib nibWithNibName:[Cell2 description] bundle:[NSBundle mainBundle]] forCellReuseIdentifier:Cell2Identifier];

self.tableView.estimatedRowHeight = 100.0;
self.tableView.rowHeight = UITableViewAutomaticDimension;

在每个单元格实现文件中我都初始化了一个属性:

self.label.numberOfLines = 0;

此外,对于每个单元格,我都添加了自动布局约束:

, ,

由于我不知道的原因,单元格高度没有动态变化。

有谁知道为什么会这样吗?

在设置自动调整大小 table 视图单元格时,不应在视图控制器中使用 "heightForRowAtIndexPath" table 视图委托方法。