I have TableViewController with search bar, after update updateSearchResults it work and when I change TabBarItem and come back I have a black screen, may be somebody had this problem? How I understand, I should clear tableview in viewWillDisappear
override func viewWillAppear(_ animated: Bool) {
setNavigationBar()
tableView.register(NewMessageTableViewCell.self, forCellReuseIdentifier: "cell")
tableView.tableFooterView = UIView()
super.viewWillAppear(animated)
}
override func viewWillDisappear(_ animated: Bool) {
searchUsers.removeAll()
searchController.searchBar.text = nil
tableView.endUpdates()
super.viewWillDisappear(animated)
}