Assertion failure in -[UITableView _configureCellForDisplay:forIndexPath:]
今天做一个tableView遇到一个这么个问题。
经过baidu google,终于找到正解。
因为
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath     *)indexPath
这个函数的返回值是个null!!
查stackoverflow 找到下面的解。
CellIdentifier I bet your cellForRowAtIndexPath is returning null.- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath     *)indexPath
{static NSString *CellIdentifier = @"Photos";/** NOTE: This method can return nil so you need to account for that in code */UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];// NOTE: Add some code like this to create a new cell if there are none to reuseif(cell == nil){cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier] autorelease];}NSString *string = [[self.photosInPlace objectAtIndex:indexPath.row]     valueForKeyPath:@"description._content"];cell.textLabel.text = string;return cell;
}
That's probably why [UITableView _configureCellForDisplay:forIndexPath:] is failing... becausecellForRowAtIndexPath is returning a null value and then configureCellForDisplay is expecting aUITableViewCell.

转:http://blog.csdn.net/theonezh/article/details/8613593

转:Assertion failure in -[UITableView _configureCellForDisplay:forIndexPath:]相关推荐

  1. iOS 运行出现:Assertion failure in -[UITableView dequeueReusableCellWithIdentifier:forIndexPath:], /Sourc

    错误原因: 未提前注册tableView的cell,执行该行代码时,会执行 tableView: cellForRowAtIndexPath:方法,最终崩溃在tableView dequeueReus ...

  2. InnoDB: Assertion failure in thread 140536591259392 in file page0zip.ic

    恢复备份时的报错: mysql恢复时遇到报错: InnoDB: Doing recovery: scanned up to log sequence number 2580016851456 (97% ...

  3. invalid mode 报错

    invalid mode 报错 报错信息如下 *** Assertion failure in -[GroupShadowTableView _dequeueReusableCellWithIdent ...

  4. 一个 bug / Masonry的引入

    支持iOS 6/6 Plus的时候碰到这样一个问题: 塞在UITableViewCell里的UIPageControl居中设置失败了,偏右 刚刚设置时下断点查看(6Plus模拟器): <Gray ...

  5. 应用程序崩溃定位查找 (二)

    教程的第一部分介绍了 SIGABRT 和 EXC_BAD_ACCESS 的错误,并说明解决他们使用 Xcode 调试器和异常断点的一些策略. 但我们的应用程序仍然有一些问题!它不能完全按照它应该并且有 ...

  6. 当程序崩溃的时候怎么办 Part-2

    泰然教程组出品,转载请保留出处并通知泰然!翻译:大侠自来也:校对:Iven 原文地址:http://www.raywenderlich.com/10209/my-app-crashed-now-wha ...

  7. iOS之程序崩溃解决

    这么多人发帖子,我也来凑个热闹,虽然是转载的,不过真的挺好用的.                                from:http://article.ityran.com/archi ...

  8. iOS 关于UITableView的黑科技

      UITableView是我们最常用的控件了,今天我就来介绍一些关于UITableView的黑科技和一些注意的地方. 1.修改左滑删除按钮的高度   左滑删除这是iOS最先发明的,之后安卓开始模仿. ...

  9. OC UITableView 的些许问题

    OC UITableView 的些许问题 文章目录 OC UITableView 的些许问题 解决iOS11tableView:heightForHeaderInSection:方法不执行的问题: 解 ...

最新文章

  1. Linux之用户组相关操作 groupadd groupdel
  2. 蓝桥杯 历届试题 分考场(DFS+枚举)
  3. 使用 Boost.MPI 的 all_reduce() 计算最小值的示例
  4. Java学习小程序(4)数列求和
  5. spark on yarn
  6. WinCE6.0学习之EBoot源码分析----startup.s(三)
  7. spring-junit4_基于Spring的应用程序-迁移到Junit 5
  8. 无法对视图创建索引,因为该视图未绑定到架构
  9. creo动画如何拖动主体_Animate如何制作动态遮罩文字动画
  10. 如何用python一个字一个字的输出汉字
  11. 中国人工智能学会最高荣誉CAAI Fellow出炉,首批53位大牛,姚期智谭铁牛等入选
  12. 基于 socket.io 实现实时你画我猜游戏
  13. Matlab 单形法原理,实验报告(单纯形法的matlab程序).doc
  14. smartadmin官网_smartadmin api_smartadmin 下载
  15. 将h.264视频流封装成flv格式文件(二.开始动手)
  16. OCR电子发票批量自动合成软件
  17. 华为交换机查看当前配置
  18. 电子设计教程53:555定时器工作原理与常见应用
  19. 完美卸载office
  20. 《见识》----吴军博士,读书笔记

热门文章

  1. AI芯片,为何现在成为新军备竞赛?
  2. Top10机器学习开源项目发布,历时一个月评出 | 附GitHub地址
  3. 数据载入过慢?这里有一份TensorFlow加速指南
  4. 2018年AI如何发展?普华永道做出了8点预测 | 报告下载
  5. 日调度5万亿次 腾讯云微服务架构体系TSF深度解读
  6. 如果你在aws ec2上安装php7x 的时候提示 libwebp 错误,可以试一下下面这个代码...
  7. “水仙花数”你了解多少??
  8. 【Android Camera】之 Preview
  9. 企业邮件系统搭建-关于不能往yahoo,sina,hotmail地址发邮件的问题一
  10. 如何在一个月内让QQ农场冲上40级