我的那些bug tableViewController-cell显示数据

在iOS开发中遇到UITableView加载cell时出现'NSInternalInconsistencyException'异常,详细分析了错误堆栈信息,并通过断点调试、模块化代码执行定位bug。最终发现是由于在显示cell的方法中一处条件判断错误,修复后解决了问题。建议在遇到类似问题时,可以尝试系统报错提示的线索,适当休息调整思路也有助于问题解决。
摘要由CSDN通过智能技术生成

 报错:

2016-07-07 22:01:39.903 _城觅[71351:7788270] *** Assertion failure in -[UITableView _configureCellForDisplay:forIndexPath:], /BuildRoot/Library/Caches/com.apple.xbs/Sources/UIKit_Sim/UIKit-3512.60.7/UITableView.m:7971

2016-07-07 22:01:39.909 _城觅[71351:7788270] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'UITableView (<UITableView: 0x7fca06034600; frame = (0 0; 375 667); clipsToBounds = YES; autoresize = W+H; gestureRecognizers = <NSArray: 0x7fca03e0e140>; layer = <CALayer: 0x7fca03e57070>; contentOffset: {0, -64}; contentSize: {375, 608.5}>) failed to obtain a cell from its dataSource (<_UIFilteredDataSource: 0x7fca03d16af0>)'

*** First throw call stack:

(

0   CoreFoundation                      0x0000000101843d85 __exceptionPreprocess + 165

1   libobjc.A.dylib                     0x0000000100f31deb objc_exception_throw + 48

2   CoreFoundation                      0x0000000101843bea +[NSException raise:format:arguments:] + 106

3   Foundation                          0x0000000100b7bd5a -[NSAssertion

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值