滚动表视图时获取异常

时间:2012-07-19 12:27:14

标签: iphone objective-c ios

我有自定义单元格的表视图。我在桌子视图上有100张图片。当我运行应用程序时,所有图像都被加载到表视图上。我也可以从上到下滚动直到第100个元素。但是当从底部滚动到固定元素中间某处时出现以下异常:

     *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Could not load NIB in bundle: 'NSBundle </Users/bc/Library/Application Support/iPhone Simulator/5.1/Applications/B5090983-ACC0-4428-9741-255B7D72F674/ImageCaching.app> (loaded)' with name 'CustomCell''
*** First throw call stack:
(0x159b022 0x172ccd6 0x1543a48 0x15439b9 0x2fd638 0x2feeb7 0x33b7 0x176c54 0x1773ce 0x162c04 0x1716f1 0x11ad42 0x159ce42 0x1f53679 0x1f5d579 0x1ee24f7 0x1ee43f6 0x1f7f1ce 0x1f7f003 0x156f936 0x156f3d7 0x14d2790 0x14d1d84 0x14d1c9b 0x14847d8 0x148488a 0xdc626 0x298d 0x28f5)
terminate called throwing an exception(lldb) 

我有以下表格视图代码:

   NSArray *objects=[[NSBundle mainBundle]loadNibNamed:@"CustomCell" owner:self options:nil];
    NSLog(@"count =%d" ,[objects count]);
    CustomCell *cell=[objects objectAtIndex:0];
    Resource *r=[setUpArray objectAtIndex:indexPath.row];
       cell.cellImage.image=[UIImage imageWithContentsOfFile:[library getResource:r.key]];

我正在准确加载自定义单元格的笔尖名称。请给我一些解决方案。

0 个答案:

没有答案