0
我有两种不同类型的细胞。我需要在方法中为它们中的每一个指定不同的尺寸:如何确定heightForRowAtIndexPath方法内的单元格的reuseIdentifier?
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath
如何确定单元格的类型?也许得到它reuseIdentifier或等
更新 当我尝试这个
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath
{
NSLog(@"%@", [self.tableView cellForRowAtIndexPath:indexPath]);
}
你不应该尝试使用的cellForRowAtIndexPath让细胞:方法heightForRowAtIndexPath:方法,因为它会造成死循环和异常。 – ArturOlszak