我在我的视图中添加了一个UISearchController,但我想改变它的高度。这就是我所拥有的:
func initSearch() {
// Create the search controller and make it perform the results updating.
searchController = UISearchController(searchResultsController: nil)
searchController.delegate = self
searchController.searchBar.delegate = self
searchController.hidesNavigationBarDuringPresentation = true
searchController.dimsBackgroundDuringPresentation = true
searchController.searchBar.tintColor = UIColor.whiteColor()
searchController.searchBar.barStyle = .Black
searchController.searchBar.scopeButtonTitles = [ "Any", "Title", "Content", "Keywords" ]
self.definesPresentationContext = true
}
@IBAction func searchTapped(sender: AnyObject) {
// Present the view controller.
presentViewController(searchController, animated: true, completion: nil)
}
下面是它的外观截图。我想从高处修剪一些空间。怎么办呢?