在iOS12和更早版本上工作,但在iOS13上崩溃,并出现以下错误
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'UISearchController's control over its search bar has been destroyed.Please use the search bar prov
我向我的应用程序中添加了一个UISearchController,并将其设置为searchBar到searchBar的titleView of my navigationItem。searchController = UISearchController(searchResultsController: searchResultsController)
searchController.searchResultsUpdater
searchController.dimsBackgroundDuringPresentation = false这段代码不能正常工作a view controller while it is deallocating is not allowed and may result in undefined behavior
此外,当我在搜索栏上键入时,搜索控制器不能正常工作<