I have code that creates UISearchController' in my UIVIew's viewDidLoad`.
self.resultSearchController = ({ let controller = UISearchController(searchResultsController: nil) controller.searchResultsUpdater = self controller.searchBar.delegate = self controller.dimsBackgroundDuringPresentation = false controller.searchBar.sizeToFit() controller.hidesNavigationBarDuringPresentation = false
Immediately after closing is completed, this warning appears on the console:
Attempting to load the view of a view controller while it is deallocating is not allowed and may result in undefined behavior (<UISearchController: 0x154d39700>)
I do not understand what I am doing wrong. This similar question is not really my situation (at least I don't think so). What's happening?
ios swift uisearchcontroller
MortalMan Aug 29 '15 at 3:23 2015-08-29 03:23
source share