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 reuse
if(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
分享到:
相关推荐
当你在linux中安装eclipse或者安装其他的包时遇到这样得问题:java: xcb_xlib.c:50: xcb_xlib_unlock: Assertion `c->xlib.lock' failed,可以按照下面步骤:第一:倒退回FC7的libx11. 卸载以下两个包的时候,可能有...
前 MiniTest::Assertion--- expected+++ actual@@ -1 +1 @@-{"widget"=>{"debug"=>"on", "window"=>{"title"=>"Sample Konfabulator Widget", "name"=>"main_window", "width"=>500, "height"=>500}, "image"=>{"src...
Assertion "pcb->snd_queuelen >= pbuf_clen(next->p)" failed at line 1111 in../Middlewares/Third_Party/LwIP/src/core/tcp_in.c Assertion "pbuf_free: p->ref > 0" failed at line 753 in ../Middlewares/Third...
将assertion作为grant_flow添加到初始化程序。 有多种使用方法: 重复使用设计配置(返回OmniAuth AuthHash) 直接Omniauth配置(返回OmniAuth AuthHash) 其他替代方案(它们与OmniAuth AuthHash不兼容) 重用...
2017-11-15 19:23:48 fc8 InnoDB: Assertion failure in thread 4040 in file fut0lst.ic line 83 InnoDB: Failing assertion: addr.page == FIL_NULL || addr.boffset >= FIL_PAGE_DATA InnoDB: We intentionally ...
- Added fix for: 64 bit Debugger assertion - Added fix for: Undo destroyed editor buffer - Added fix for: Vista 64 IDE startup delay - Added: QC #74646: Buffer overflow in TCustomClientDataSet....
一份非常好的 SVA 资料,详细介绍怎样写出好的 assertion。资料的最后部分以 sync_fifo 为例子,详细介绍了 assertion 的写法
Patch 21068553: OJVM PATCH SET UPDATE 11.2.0.3.4 ...13359289 ORA-29516: AURORA ASSERTION FAILURE: ASSERTION FAILURE AT JOETHREAD.C:4040 POLLE 14774730 Fix for Bug 14774730 15950541 Fix for Bug 159
巴别尔断言 :joker: :exclamation_question_mark_selector: 自动将Expect.assertions(n)和Expect.hasAssertions添加到所有测试中 问题 是否曾经想过您的测试是否实际上正在运行其断言,尤其是在异步测试中?...
符合人体工程学,现代且类型安全的TypeScript断言库 将Jest的大部分带回给上等摩卡 产品特点 :flexed_biceps: 强大的验证器和匹配器 :robot: 类型安全-用TypeScript编写,可以很好地进行静态分析 ...
assertion-agent-all-0.0.25-sources.jar
将 /lib/glew32.lib 拷贝到VC安装目录下的 lib 目录下(如:/Microsoft Visual Studio 9.0/VC/lib/下), 将 /include/glew.h 和 /include/wglew.h 拷贝到 VC 安装目录下的 /include/gl/ 目录下(如:/Microsoft ...
assertion-agent-all-0.0.25.jar
assertion-weaver-0.0.25-sources.jar
assertion-constraints-0.0.25-sources.jar
assertion-sample-0.0.25-sources.jar
assertion-mojo-0.0.25-sources.jar
assertion-agent-0.0.25-sources.jar
maven-fest-assertion-generator-plugin-1.0-sources.jar
maven-fest-assertion-generator-plugin-1.0.jar