I am setting my height:
- (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;
}
Here is how cell.totalHeight
is calculated:
-(float)totalHeight {
float h = messageLabel.totalheight + 35;
if(h < 68) h = 68;
return h;
}
My simulator crashes with no debug errors when NSZombieEnabled = NO
. Simulator runs fine when NSZombieEnabled = YES
. Not sure how to resolve?
UPDATE: This is how I am building my initializing my cell:
cell = [[[ChartlyCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier andDelegate:self andChartlyDelegate:self andChartlyObj:myChartlyObject]autorelease];
If I remove the autorelease, everything runs fine. I am still confused why?