Ios &引用;没有重复使用的表单元格的索引路径;导致应用程序崩溃

Ios &引用;没有重复使用的表单元格的索引路径;导致应用程序崩溃,ios,objective-c,uitableview,uiwebview,Ios,Objective C,Uitableview,Uiwebview,我的手机有两个视图。点击时,我在展开视图和折叠视图之间切换。我有两个单独的自定义表格视图单元格 如果我使用[tableView reloadData]它可以正常工作,但是当我使用reloadRowsAtIndexPaths时,应用程序崩溃。它在不使用断点的情况下运行良好,尽管我怀疑在没有断点的情况下可能更难复制。我的单元格中有一个UIWebView,可以点击我正在使用的uitappesturerecognizer - (BOOL)gestureRecognizer:(UIGestureRecog

我的手机有两个视图。点击时,我在展开视图和折叠视图之间切换。我有两个单独的自定义
表格视图单元格

如果我使用
[tableView reloadData]
它可以正常工作,但是当我使用
reloadRowsAtIndexPaths
时,应用程序崩溃。它在不使用断点的情况下运行良好,尽管我怀疑在没有断点的情况下可能更难复制。我的单元格中有一个
UIWebView
,可以点击我正在使用的
uitappesturerecognizer

- (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldRecognizeSimultaneouslyWithGestureRecognizer:(UIGestureRecognizer *)otherGestureRecognizer {
return YES;
}

代码到达willdisplaycell,但随后崩溃。我刚刚提交了这段代码,在我同事的机器上,它只显示“没有重用表单元格的索引路径”,没有任何崩溃


控制台上唯一的错误是“没有重用表单元格的索引路径”。在代码中,它在main.m文件中显示EXC_BAD_访问。库/日志/诊断报告中没有崩溃报告

跟踪我得到的/var/log/system.log

Dec 23 23:59:55 Ankushs-MacBook-Pro.local com.apple.debugserver-300.2[50272]: Got a 'k' packet, killing the inferior process.
Dec 23 23:59:55 Ankushs-MacBook-Pro.local com.apple.debugserver-300.2[50272]: Sending ptrace    PT_KILL to terminate inferior process.
Dec 23 23:59:55 Ankushs-MacBook-Pro.local com.apple.debugserver-300.2[50272]: 1 +0.000000 sec   [c460/0303]: error: ::ptrace (request = PT_THUPDATE, pid = 0xc45d, tid = 0x1a03, signal = 0) err =   Resource busy (0x00000010)
Dec 23 23:59:55 Ankushs-MacBook-Pro.local com.apple.debugserver-300.2[50272]: 2 +0.004694 sec [c460/0303]: error: ::task_info ( target_task = 0x1603, flavor = TASK_BASIC_INFO, task_info_out => 0x7fff52208f90, task_info_outCnt => 10 ) err = (ipc/send) invalid destination port (0x10000003)
Dec 23 23:59:55 Ankushs-MacBook-Pro.local com.apple.debugserver-300.2[50272]: Waited 0 ms for process to be reaped (state = Exited)
Dec 23 23:59:56 Ankushs-MacBook-Pro.local com.apple.debugserver-300.2[50333]: debugserver-300.2 for x86_64.
Dec 23 23:59:56 Ankushs-MacBook-Pro.local com.apple.debugserver-300.2[50333]: Listening to port 31030 for a connection from localhost...
Dec 23 23:59:56 Ankushs-MacBook-Pro.local com.apple.debugserver-300.2[50333]: Got a connection, waiting for process information for launching or attaching.
Dec 23 23:59:56 Ankushs-MacBook-Pro kernel[0]: warning: debugserver(50333) performed out-of-band resume on FormulaApp(50332)
Dec 23 23:59:57 Ankushs-MacBook-Pro.local com.apple.debugserver-300.2[50333]: Attach succeeded, ready to debug.

您可以尝试在webView上禁用触摸,并在didSelectRow中拦截触摸

另外,请尝试使用以下命令,而不是
[tableView reloadData]

[tableView beginUpdates];
[tableView endUpdates];

它几乎总是能更好地折叠表视图。

在我的例子中,我需要webview来处理水平滚动,并将其余事件传递给父表单元格。你能用单元格的屏幕截图更新你的问题吗?我会试着想出一个更优雅的解决方案。嘿,斯塔斯,我对stackoverflow还不熟悉。我没有足够的声望点数在我的问题中添加图片。我已经把他们两张图片上传到我的dropbox帐户。抱歉给你添麻烦了。控制台上唯一的错误是“没有重用表单元格的索引路径”。在代码中,它在main.m文件中显示EXC_BAD_访问。Library/Logs/DiagnosticReports中没有崩溃报告。似乎您正在其中一个TableView数据源ol委托方法中返回一个单元格,而您不应该返回该单元格。也许在viewForHeader中?
[tableView beginUpdates];
[tableView endUpdates];