【发布时间】:2011-08-06 23:26:02
【问题描述】:
在某些情况下,UITableView didSelectRowAtIndexPath 被调用两次导致错误Pushing the same view controller instance more than once is not supported。
以下是事件的顺序:
TableView::didSelectRowAtIndexPath.
TableView::viewWillDisappear.
PushedViewController::viewWillAppear.
TableView::didSelectRowAtIndexPath.
Error: Pushing the same view controller instance more than once is not supported'
唯一值得注意的是 UITableView 正在异步加载图像,但它从不调用didSelectRowAtIndexPath。此外,PushedViewController 被重用以避免每次在 UITableView 中选择单元格时都必须重新加载它。
有人知道是什么原因造成的吗? 谢谢。
【问题讨论】:
-
贴一些相关代码?
-
确保你调用的 deselectrowatindx 路径没有选择......
-
狂喜,我不打电话给任何一个。杰米,什么相关的代码?有一个 pushViewController 然后发生上述情况(不是所有时间)。
-
你能发布第二个
didSelectRowAtIndexPath:的堆栈跟踪吗?
标签: iphone tableview didselectrowatindexpath