为什么:“尝试加载..同时解除分配......:UISearchController:” [英] Why: "Attempting to load .. while deallocating... :UISearchController:"

查看:146
本文介绍了为什么:“尝试加载..同时解除分配......:UISearchController:”的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有根故事板,其中有一个按钮,可以推送ViewControllerB。

I have root storyboard that has a button that pushes ViewControllerB.

ViewControllerB有一个排序控制器 UISortController

ViewControllerB has a sort controller UISortController.

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

ViewControllerB has a "back" method that is controlled by the root nav controller.

我收到以下警告:

试图加载视图视图控制器在释放时是不允许的,可能会导致未定义的行为(< UISearchController:0x7ff10258ba60>)

我用 Apple的样本(需要会员资格)添加新的UISearchController。

I used Apple's sample (membership required) to add the new UISearchController.

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

Has anyone come across this? How do I resolve it?

推荐答案

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

I would recommend using Storyboard Unwind Segues instead: https://developer.apple.com/library/ios/technotes/tn2298/_index.html

这篇富有洞察力的帖子还有很多非常有用的实现细节:

This insightful post also has a wealth of very useful implementation detail:

什么是Unwind segues以及如何使用它们?

这篇关于为什么:“尝试加载..同时解除分配......:UISearchController:”的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆