2015-09-13 47 views
2

当我尝试运行我在的iOS 9.1模拟器的应用程序,我有一个崩溃iOS9驳回键盘导致崩溃

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

崩溃发生在主要功能。

崩溃发生时,我尝试用

[self.username resignFirstResponder]; 

还可以隐藏键盘,当你self.view.userInteractionEnabled = false;

我读过View appear with modal view animation instead of show (push) animation有类似的问题 - 但我只有1根导航控制器

有任何想法吗?

的iOS 9只臭虫

+0

我已经启用僵尸,这里我得到了什么 [UIInputWindowController parentViewController]:消息发送到释放实例0x7f9d29817a00 – Andrew

回答

4

问题是用的UIViewController类

dealloc方法是重写的清理通知回调。

,它可能由于以下事实:[超级的dealloc]不叫造成在iOS 9.崩溃(由于ARC限制)

解决方案 - 从类别中删除dealloc方法的子类的UIViewController

+0

这应该被接受为正确的答案。 – Ahmed