This must be trivial, but I can't find how you're supposed to dismiss a UISearchController programmatically?
Note that it's the new UISearchController (introduced in 2014 with iOS 8), not the UISearchDisplayController.
So far here's what I've got
// Dismiss the search tableview
searchController.dismissViewControllerAnimated()
// Clear the Search bar text
searchController.active = false
But I still have the cancel button and can't get rid of it.