在某些情况下, UITableViewdidSelectRowAtIndexPath
被调用两次导致错误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 中选择单元格时都必须重新加载它。
任何人都知道可能导致这种情况的原因是什么?谢谢。