//Why does the tableView containing the searchResults array, after rotation to landscape and back to portrait, push the top of the tableView down thus separating the searchBar from the top of the tableView. This occurs repeatedly after each rotation to landscape and back. This only occurs after a search is instituted. It does not happen on rotation if the searchController is not active.
class InitialViewController: UIViewController, UITableViewDataSource, UITableViewDelegate,UISearchResultsUpdating {
@IBOutlet weak var tableView: UITableView!
let searchController = UISearchController(searchResultsController: nil)
let b = searchController.searchBar
b.sizeToFit() // crucial, trust me on this one
b.scopeButtonTitles = ["Drugs", "Tumor", "Target"]
tableView.tableHeaderView = searchController.searchBar
definesPresentationContext = true
searchController.searchResultsUpdater = self
searchController.dimsBackgroundDuringPresentation = false