Pit*_*Pan 1 iphone uisearchbar ios swift uisearchcontroller
Search Bar塞维到新的后不想消失ViewController.我创建search bar它:
self.searchBar = UISearchController(searchResultsController: nil)
self.searchBar.searchResultsUpdater = self
self.searchBar.dimsBackgroundDuringPresentation = false
self.navigationController?.extendedLayoutIncludesOpaqueBars = true
self.tableView.tableHeaderView = self.searchBar.searchBar
self.tableView.reloadData()
Run Code Online (Sandbox Code Playgroud)
for segue to new View Controllerfrom TableViewControllerI使用此函数:
override func tableView(tableView: UITableView, didSelectRowAtIndexPath indexPath: NSIndexPath) {
self.performSegueWithIdentifier("ContentViewCOntroller", sender: self)
}
Run Code Online (Sandbox Code Playgroud)
这张照片中的更多细节: