Groupted table view cells not loading.
Posted
by Tejaswi Yerukalapudi
on Stack Overflow
See other posts from Stack Overflow
or by Tejaswi Yerukalapudi
Published on 2010-04-11T00:34:43Z
Indexed on
2010/04/11
0:43 UTC
Read the original article
Hit count: 636
iphone
|uitableview
Hi,
I'm working on creating a grouped table view. The data is being loaded alright, but in the grouped view there are a lot of white empty spaces. They get populated after I scroll up and down a few times. Help?
Here's my getCellForRowIndexAtPath
method:
static NSString *Id= @"CustomDiagChargeID";
CustomCellDiagCharges *cell = (CustomCellDiagCharges *)[tableView dequeueReusableCellWithIdentifier:Id];
if(cell == nil) {
NSArray *nib = [[NSBundle mainBundle] loadNibNamed:@"CustomCellDiagCharges" owner:self options:nil];
for (id oneObject in nib) {
if([oneObject isKindOfClass:[CustomCellDiagCharges class]])
cell = (CustomCellDiagCharges *) oneObject;
}
}
NSUInteger row = [indexPath row];
DiagDetails *rowData = [preferences getDiagElementAt:indexPath.section row:row];
cell.code.text = rowData.ICD9Code;
cell.desc.text = rowData.ICD9Desc;
return cell;
Thanks,
Teja.
© Stack Overflow or respective owner