Я устанавливаю свой рост:
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath
{
CGFloat rowHeight = 0;
if(indexPath.row == [self.items count]){ //more
rowHeight = 50.0; //same as moreCell
}
else{
ChartlyCell *cell = (ChartlyCell*)[self tableView:tblView cellForRowAtIndexPath:indexPath];
rowHeight = cell.totalHeight;
}
return rowHeight;
}
Вот как рассчитывается cell.totalHeight
:
-(float)totalHeight {
float h = messageLabel.totalheight + 35;
if(h < 68) h = 68;
return h;
}
Мой симулятор падает без ошибок отладки, когда NSZombieEnabled = NO
. Симулятор работает нормально, когда NSZombieEnabled = YES
. Не знаете, как решить?
UPDATE:
Вот как я строю свою инициализирующую ячейку:
cell = [[[ChartlyCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier andDelegate:self andChartlyDelegate:self andChartlyObj:myChartlyObject]autorelease];
Если я удаляю авто-релиз, все работает нормально. Я все еще в замешательстве, почему?