Skip to content

Instantly share code, notes, and snippets.

@samuelbeek
Created November 27, 2015 12:21
Show Gist options
  • Save samuelbeek/39cac19a659d64c29825 to your computer and use it in GitHub Desktop.
Save samuelbeek/39cac19a659d64c29825 to your computer and use it in GitHub Desktop.
Search Bars
self.resultSearchController = ({
let controller = UISearchController(searchResultsController: nil)
controller.searchResultsUpdater = self
controller.dimsBackgroundDuringPresentation = false
controller.hidesNavigationBarDuringPresentation = false
controller.searchBar.barStyle = .Black
controller.searchBar.sizeToFit()
self.tableView.tableHeaderView = controller.searchBar
return controller
})()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment