iOS9关闭键盘会导致崩溃

And*_*rew 2 crash keyboard ios9

当我尝试在iOS 9.1模拟器上运行我的应用程序时出现崩溃

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

主功能崩溃。

当我尝试用关闭键盘时会发生崩溃

[self.username resignFirstResponder];
Run Code Online (Sandbox Code Playgroud)

当你 self.view.userInteractionEnabled = false;

我已经阅读了具有模态视图动画的View出现,而不是类似问题的show(push)动画 -但我只有1个根导航控制器

有任何想法吗?

仅iOS 9错误

And*_*rew 5

问题在于UIViewController类别

重写dealloc方法以清除通知回调。

而且它在iOS 9上造成了崩溃。可能是由于未调用[super dealloc]的事实(由于ARC限制)

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