我有一个表视图控制器,并且我有一个附加到标题的搜索栏。
tableView.tableHeaderView = searchController?.searchBar
当我在搜索栏中输入单词时,我的帖子将从Firebase中检索并显示在另一个名为segueTableViewController的表中
let locationSearchTable = UIStoryboard(name: "MainPage", bundle: nil).instantiateViewController(withIdentifier: "SegueTableViewController") as! SegueTableViewController
searchController = UISearchController(searchResultsController: locationSearchTable)
searchController?.searchResultsUpdater = locationSearchTable
当我单击segueTableViewController中的单元格时,它会将我分割为详细页面,但此页面没有导航栏。但是,当我从另一个页面转到详细页面时,它有一个导航栏。我一直试图弄清楚为什么几个月,我不能。
override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
if segue.identifier == "GOTOPOST" {
if let IndexPaths = self.followUsersTableView.indexPathForSelectedRow {
self.navigationController?.isNavigationBarHidden = false
let vc = segue.destination as! BookDetailsViewController
}}}