【发布时间】:2012-09-16 18:53:32
【问题描述】:
我正在尝试使用情节提要制作自定义单元格。 我已经用基本单元测试了我的程序并且它有效。 现在我创建了一个名为 NewsCell 的新类,它包含自定义单元格中的不同标签。 我还使单元格成为 NewsCell 的子类。单元格标识符是“NewsCell”。
这是 cellForRowAtIndexPath: 方法:
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
NewsCell *cell = (NewsCell *)[tableView dequeueReusableCellWithIdentifier:@"NewsCell"]; //signal : SIGABRT
News *info = [self.news objectAtIndex:indexPath.row];
cell.titreLabel.text = info.titre;
cell.descriptionLabel.text = info.description;
return cell;
}
当我运行我的应用程序时,它会在第一行出现信号信号 SIGABRT 崩溃。 我确信我在标签和表格视图单元之间建立了正确的连接。
*** 由于未捕获的异常“NSInternalInconsistencyException”而终止应用程序,原因:“NIB 数据无效。”
【问题讨论】:
标签: ios5 uitableview storyboard