I create my own nib, and class for it. I hooked up all the controls to the class in interface builder. When I run it it runs fine. The only problem is that when I scrole the tableview it crashes. Any ideas what the error could be? I've been trying to fix this for a while to no avail. It gives an EXC_BAD_ACCESS which I'm not sure how to debug.
int cellType = [streamDataProvider cellTypeForIndex:indexPath.row];
if(cellType == HOP_GRAFITTI){
static NSString *CellIdentifier = @"HopGrafittiStreamCell";
HopGrafittiStreamCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
if (cell == nil) {
NSArray *nib = [[NSBundle mainBundle] loadNibNamed:@"HopGrafittiStreamCell" owner:self options:nil];
cell = (HopGrafittiStreamCell *)[nib objectAtIndex:0];
[cell retain];
}
[cell.username setText: [streamDataProvider userNameForIndex:indexPath.row]];
[cell.venuename setText: [streamDataProvider venueNameForIndex:indexPath.row]];
[cell.grafittiText setText: [streamDataProvider grafittiForIndex:indexPath.row]];
return cell;
}