我有两种不同类型的细胞。我需要在方法中为它们中的每一个分配不同的大小:
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath
如何确定细胞类型?也许得到它的重用标识符等。
更新 当我尝试这个
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath
{
NSLog(@"%@", [self.tableView cellForRowAtIndexPath:indexPath]);
}