views:

135

answers:

1

I have this code:

tableList  = [[NSMutableArray alloc] initWithObjects:@"First View",@"Second View",nil];

I have synthesized it and set the property, the problem is when I add this line under the configure the cell comment to set the text of each row, the app opens in the simulator but instantly closes:

// Configure the cell.
    cell.textLabel.text = [tableList objectAtIndex:indexPath.row];
return cell;

Any ideas on what is causing this ?

+1  A: 

If you're getting an index: beyondBounds: crash, then you need to make sure that your table has no more rows than the tableList array has elements.

cdespinosa
Your time and efforts are really appreciated :)
Dave