在iOS 8中更改UISearchController视图高度的高度?

Tru*_*an1 6 uiviewcontroller ios swift ios8 uisearchcontroller

我在我的视图中添加了一个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)
}
Run Code Online (Sandbox Code Playgroud)

下面是它的外观截图.我想从高处修剪一些空间.如何才能做到这一点?

在此输入图像描述