我有三个习惯TableViewCells。我有我需要heightForRowAtIndexPath在代码中设置的三个单元格之一,因为我不能在 Storyboard 中使用 AutoLayout。
有没有办法heightForRowAtIndexPath为特定的自定义设置TableViewCell?
我的heightForRowAtIndexPath:
- (CGFloat) tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath {
id model = self.combinedModel[indexPath.row];
// Custom Table View Cell Two
if ([model isKindOfClass:[Data self]]) {
return 500;
}
// Custom Table View Cell One and Three
else {
// Not sure what to put here, but need to put something without setting a height
}
}