为什么:"尝试加载..同时解除分配......:UISearchController:"

Dav*_*nte 5 uitableview uisearchbar ios

我有根故事板,有一个按钮,推动ViewControllerB.

ViewControllerB有一个排序控制器UISortController.

ViewControllerB有一个"后退"方法,由根导航控制器控制.

我收到以下警告:

Attempting to load the view of a view controller while it is deallocating is not allowed and may result in undefined behavior (<UISearchController: 0x7ff10258ba60>)

我使用Apple的示例(需要会员资格)来添加新的UISearchController.

有人遇到过这个吗?我该如何解决?

And*_*ing 1

我建议使用 Storyboard Unwind Segues 代替:https://developer.apple.com/library/ios/technotes/tn2298/_index.html

这篇富有洞察力的文章还提供了大量非常有用的实现细节:

Unwind segue 的用途是什么以及如何使用它们?