【发布时间】:2016-02-18 17:30:01
【问题描述】:
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
static NSString *simpleTableIdentifier = @"SimpleTableItem";
SimpleeTableCell *cell = [tableView dequeueReusableCellWithIdentifier:simpleTableIdentifier];
if (cell == nil) {
NSArray *nib = [[NSBundle mainBundle] loadNibNamed:@"SimpleTableCell" owner:self options:nil];
cell = [nib objectAtIndex:0];
}
cell.TitleLabel.text = [tableData objectAtIndex:indexPath.row];
cell.PlaceLabel.text = [placeData objectAtIndex:indexPath.row];
cell.imageView.image = [UIImage imageNamed:[thumbnails objectAtIndex:indexPath.row]];
cell.RankingsLabel.text = [rankingsData objectAtIndex:indexPath.row];
cell.StatusLabel.text = [statusData objectAtIndex:indexPath.row];
cell.DistanceLabel.text = [distanceData objectAtIndex:indexPath.row];
return cell;
}
我该如何解决这个错误?
【问题讨论】:
-
哪一行导致崩溃?你在哪里说相应的委托方法中有多少行?
-
是的,构成您的数据集的 6 个数组中的哪一个导致了问题?
标签: objective-c nsarray nsrangeexception