13
尝试在取消分配时加载视图控制器的视图…UISearchController
我有创建UISearchController' in my UIVIew'sviewDidLoad`的代码。 self.resultSearchController = ({ let controller = UISearchController(searchResultsController: nil) controller.searchResultsUpdater = self controller.searchBar.delegate = self controller.dimsBackgroundDuringPresentation = false controller.searchBar.sizeToFit() controller.hidesNavigationBarDuringPresentation = false //prevent search bar from moving controller.searchBar.placeholder = "Search for song" self.myTableView.tableHeaderView = controller.searchBar return controller })() 关闭完成后,控制台中会立即显示以下警告: Attempting to load the view of a view …