如下报错:
Attempting to load the view of a view controller while it is deallocating is not allowed and may result in undefined behavior (<UISearchController: 0x7fb91a72b400>)
![](https://img.haomeiwen.com/i2069062/e0542d00dcb55a57.png)
解决办法:
-(void)dealloc
{
/**
* 解决退出登录时 UISearchController 报错的相关问题
*/
[self.searchVc.view removeFromSuperview];
}
网友评论