在做 点击section下拉展示相应cell的功能时,遇到了闹心的“Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '* -[__NSArrayM insertObject:atIndex:]:”
各种debug,各种调试,都发现是系统刷新cell时发生错误
最后,发现之所以会导致系统的那个错误,完全是因为使用了“自适应高度的cell”
self.tableView.estimatedRowHeight = 80 self.tableView.estimatedSectionHeaderHeight = 100 self.tableView.rowHeight = UITableViewAutomaticDimension self.tableView.sectionHeaderHeight = UITableViewAutomaticDimension
找到问题所在之后,就简单了,删除上边的代码即可
另:如果要调试这个错误,可以添加断点:“Add Symbolic Breakpoint”-> 输入 “[NSArray insertObject:atIndex:]”
相关推荐
Terminating app due to uncaught exception 'NSInternalInconsistencyException' ///继续看下去如: reason: 'UITableView dataSource returned a nil cell for row at index path:... ... ///找到这段英文中出现...
2.Assertion failure and Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'No view controller managing visible view. detail in ...
除了大多数访问器的无法识别的选择器之外,以下是常见的例外情况: *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[NSOrderedSet intersectsSet:]: set argument is...
fix crash ---- Terminating app due to uncaught exception NSInvalidArgumentException , reason: [AVCaptureMetadataOutput setMetadataObjectTypes:] unsupported type found. Use ...
Terminating app due to uncaught exception 'NSGenericException', reason: 'UIPopoverPresentationController () should have a non-nil sourceView or barButtonItem set before the presentation occurs.' ...
侧边栏iOS 14 这是一个示例...已知错误以紧凑模式启动应用程序,然后将其更改为常规模式会导致以下错误: Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Unexpected vie
下面把searchDisplayController 引起的数组越界处理办法给大家分享如下...Terminating app due to uncaught exception 'NSRangeException', reason: '*** -[__NSArrayI objectAtIndex:]: index 1 beyond bounds [0 .. 0
2012-11-28 13:22:08.911 PropMemFun [2132:11303] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[CFString respondsToSelector:]: message sent to deallocated ...
如果尝试添加不同纹理的精灵,则会触发错误“SpriteBatch [13879:207] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'CCSprite is not using the same texture id'...