Attempting to load the view of a view controller while it is deallocating… UISearchController

前端 未结 13 1151
一生所求
一生所求 2020-12-01 02:34

I have code that creates a UISearchController\' in my UIVIew\'sviewDidLoad`.

 self.resultSearchController = ({
        let controller = UISearch         


        
13条回答
  •  爱一瞬间的悲伤
    2020-12-01 03:09

    It's not a bug. It seems that you have to avoid creating ViewControllers without presenting them. So after SomeViewController() or let variable: SomeViewController you have to call something like this self.presentViewController(yourViewController ...etc). If you don't do that, you will get this warning when this view controller will be dealocated.

提交回复
热议问题