I have a grouped table view that utilizes two different custom table cells.
When i scroll through the table so that one (or more) of the cells goes either above or below what is visible those cells become blank. When i scroll back up (or down) to view these cells they are still blank. Why is this? The cells showed the appropriate content when they were first loaded.
Here is the code that loads the cells at the specified indexPath:
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
if(indexPath.section==0)
{
FMLFullTextCell = (FullTextCell *) [tableView dequeueReusableCellWithIdentifier:FullTextCell_ID];
if(FMLFullTextCell==nil)
{
[[NSBundle mainBundle]loadNibNamed:@"FullTextCell" owner:self options:nil];
[FMLFullTextCell initWithFMLText:@"Here is some demo fml text"];
}
return FMLFullTextCell;
}
else
{
FMLAuthorCell=(Author *)[tableView dequeueReusableCellWithIdentifier:AuthorCell_ID];
if(FMLAuthorCell==nil)
{
[[NSBundle mainBundle]loadNibNamed:@"Author" owner:self options:nil];
[FMLAuthorCell initWithTitle:@"Author" initWithAuthor:@"JohnnyAuthor"];
}
return FMLAuthorCell;
}
}