I have this code:
tableList = [[NSMutableArray alloc] initWithObje开发者_StackOverflow社区cts:@"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 ?
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.
精彩评论