【发布时间】:2017-07-26 08:20:44
【问题描述】:
展示 SearchController 的代码:
searchController = UISearchController(searchResultsController:viewcontroller)
storageLocation.tableView.tableHeaderView = searchController.searchBar
searchController.dimsBackgroundDuringPresentation = true
searchController.hidesNavigationBarDuringPresentation = true
searchController.searchBar.prompt = "Some random text"
self.definesPresentationContext = true
searchController.searchBar.backgroundColor = .white
self.present(searchController, animated: true, completion: nil)
【问题讨论】:
标签: swift xcode8 ios10 uisearchcontroller