1

我在模态视图控制器中显示了一个UITableViewwith custom 。UITableViewCell当单元格被选中时,我将一个新UIViewController的推入导航堆栈。所有标准,但我发现了一个奇怪的错误:

假设我在表格视图中显示了 10 个单元格。如果我点击并按住一个单元格并用另一根手指随机点击其他单元格,在我松开手指后,会有多个UIViewControllers相互推压。我想这是有道理的,因为我didSelectRowAtIndexPath多次打电话。但是,我不知道如何解决它?

我收到错误:“ nested push animation can result in corrupted navigation bar”和:“ Finishing up a navigation transition in an unexpected state. Navigation Bar subview tree might get corrupted.

我设置exclusivieTouchYES在单元格上以及delaysContentTouchesNOtableView 上。

4

1 回答 1

1

Try to disable multiple selection of the table view(by setting tableView.allowsMultipleSelection = NO;, this is by default. So maybe you just need to remove your setting it to YES code). It doesn't make sense to allow user's multiple selection if it's to present a view controller. Because only one can be presented.

于 2013-04-23T15:17:18.950 回答