美文网首页iOS bug修复BUG集锦iOS进阶指南
iOS-UISearchController 的 Bug 之 A

iOS-UISearchController 的 Bug 之 A

作者: 一位不愿透露姓名的王先生_ | 来源:发表于2016-09-11 20:53 被阅读275次
如下报错:

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

点击退出登录时,控制台打印的错误提示.png
解决办法:
-(void)dealloc
{
    /**
     * 解决退出登录时 UISearchController 报错的相关问题
     */
    [self.searchVc.view removeFromSuperview];
}

相关文章

网友评论

  • 煜寒了:这个标题好长。。。
    一位不愿透露姓名的王先生_:@煜寒了 主要是报这种错误,我的第一反应就是把报错复制粘贴到百度上,定位不准确,也是方便懒得看stackOverFlow的同学

本文标题:iOS-UISearchController 的 Bug 之 A

本文链接:https://www.haomeiwen.com/subject/taosettx.html