我已确保我的单元格的自动调整大小掩码允许灵活的宽度,但是当设备旋转时,单元格不会调整大小。
我还验证了 tableview 是否已调整大小,问题直接出在单元格上。
这是我用来创建单元格的代码:
if (cell == nil) {
// Load the top-level objects from the custom cell XIB.
NSArray *topLevelObjects = [[NSBundle mainBundle] loadNibNamed:@"MetaTableViewCell" owner:self options:nil];
// Grab a pointer to the first object (presumably the custom cell, as that's all the XIB should contain).
cell = [topLevelObjects objectAtIndex:0];
}
有人能想到可能出了什么问题吗?
使用 IB 创建的单元格是否从未调整大小?