dismissViewControllerAnimated 冻结应用程序

dismissViewControllerAnimated freeze the App

我有一个 tableView 从另一个控制器模态出现,在这个 table 用户 select 一行然后单击该行,table视图关闭并用户在 UITableView 的 didSelectRowAtIndexPath.

中使用 self.dismissViewControllerAnimated(true, completion: nil) 返回到之前的控制器

奇怪的是,在用户点击后,self.dismissViewControllerAnimated 锁定应用程序几秒钟或直到用户第二次单击屏幕,然后应用程序继续 运行...

Here's the source code.

我该如何解决这个问题?

版主注意事项:它不是 UIViewController dismissViewControllerAnimated: completion: causes app to freeze 的副本,问题是由外部框架引起的!

你的回答是,你犯了一个常见的错误。你不叫 didSelectRowAtIndexPathdidDeselectRowAtIndexPath

这意味着,您的应用 "lock" 正是 didDeselect...:

的预期行为

This method is only called if there is an existing selection when the user tries to select a different row. The delegate is sent this method for the previously selected row. You can use UITableViewCellSelectionStyleNone to disable the appearance of the cell highlight on touch-down.