I’m currently building a tableview with custom UITableViewCell. I’ve done this a ton of times before but for some reason the cells aren’t showing up right. Also as I scroll up the text labels start disappearing and at this point I have no idea why. Here’s the cellForRowAtIndexPath method:
- (UITableViewCell *)tableView:(UITableView *)table cellForRowAtIndexPath:(NSIndexPath *)indexPath{
NSLog(@"Row: %i Section: %i", indexPath.row , indexPath.section);
HollerCommentCell *cell = (HollerCommentCell *)[table dequeueReusableCellWithIdentifier:@"HollerCommentCell"];
if( !cell )
{
//Initialize a new cell
NSArray *topLevelObjects = [[NSBundle mainBundle] loadNibNamed:@"HollerCommentCell" owner:nil options:nil];
for( id currentObject in topLevelObjects )
{
if([currentObject isKindOfClass:[HollerCommentCell class]]){
cell = (HollerCommentCell*)currentObject;
break;
}
}
}
[[cell name]setText:@"Nick"];
[[cell commentText]setText:@"Hello"];
return cell;
}
Also here’s a copy of my numberOfRowsInSection method:
- (NSInteger)tableView:(UITableView *)table numberOfRowsInSection:(NSInteger)section{
return ( section == 0 ) ? 5 : 0;
}
Here’s a screenshot of how it works:

No idea what’s going on now. Thoughts?
It looks like you have clipping turned off and the commentText label is sitting 44 points too low. The effect is the commentText is appearing the the row directly below the cell it should be setting in.
Maybe you should NSLog views in your cell and see where their frames are positioned at.