title: UISearchController causes black screen Swift 2.0
body: <p>I have a strange problem in <strong>iOS 9 with Swift 2.0</strong>. I added <code>UISearchController</code> in my <code>tableViewController</code> but it causes a strange <strong>black screen</strong> problem. When I press the search bar and write something it shows my filtered results without any problem but when I tap another tab bar button like <strong>Bookmarks</strong> and after that when I tap tableViewController which is <strong>Most Viewed</strong> again it shows black screen like screen shot. </p>
  
  <p>There is my <strong>tableViewController</strong>;</p>
  
  <pre><code>import UIKit
  
  class CitiesTableViewController: UITableViewController, UISearchResultsUpdating {
  
  // MARK: - Class Properties
  
  private var cities = [String]()
  private var veterinaries = [Veterinary]()
  private var filteredVeterinaries = [Veterinary]()
  private var resultSearchController: UISearchController!
  
  // MARK: - TableViewController Life Cycle Methods
  
  override func viewDidLoad() {
      super.viewDidLoad()
      self.getCitiesList()
      self.configureResultsSearchController()
  }
  
  override func viewDidDisappear(animated: Bool) {
      super.viewDidDisappear(animated)
      self.resultSearchController.active = false
  }
  
  // MARK: - Configuring Search Bar Controller
  
  private func configureResultsSearchController() {
      self.resultSearchController = UISearchController(searchResultsController: nil)
      self.resultSearchController.searchResultsUpdater = self
      self.resultSearchController.dimsBackgroundDuringPresentation = false
      self.resultSearchController.hidesNavigationBarDuringPresentation = false
      self.resultSearchController.searchBar.sizeToFit()
      self.resultSearchController.searchBar.placeholder = "Klinik veya ilçe adı"
      self.tableView.tableHeaderView = self.resultSearchController.searchBar
  }
  
  // MARK: - Table view data source
  
  override func numberOfSectionsInTableView(tableView: UITableView) -&gt; Int { return 1 }
  override func tableView(tableView: UITableView, numberOfRowsInSection section: Int) -&gt; Int {
      if self.resultSearchController.active { return self.filteredVeterinaries.count }
      else { return self.cities.count }
  }
  
  // MARK: - Table view Delegate Methods
  
  override func tableView(tableView: UITableView, didSelectRowAtIndexPath indexPath: NSIndexPath) {
      if (self.resultSearchController.active) {
          self.performSegueWithIdentifier(Constants.ShowDetailViewControllerSegueIdentifier, sender: nil)
      } else {
          self.performSegueWithIdentifier(Constants.ShowTownsTableViewControllerSegueIdentifier, sender: nil)
      }
  }
  
  override func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -&gt; UITableViewCell {
      let cell = tableView.dequeueReusableCellWithIdentifier(Constants.CellIdentifier, forIndexPath: indexPath)
      if (self.resultSearchController.active) {
          cell.textLabel?.text = self.filteredVeterinaries[indexPath.row].name
          cell.detailTextLabel?.text = self.filteredVeterinaries[indexPath.row].address
          return cell
      } else {
          cell.textLabel?.text = self.cities[indexPath.row]
          return cell
      }
  }
  
  // MARK: - PARSE Query Methods
  
  private func getCitiesList() {
      let parseQueries = ParseQueries()
      parseQueries.downloadListData() {
          (let parseResults) in
          if let veterinaries = parseResults as? [Veterinary] {
              self.veterinaries = veterinaries
              for vet in veterinaries {
                  if let city = vet.city {
                      self.cities.append(city)
                  }
              }
              dispatch_async(dispatch_get_main_queue()) {
                  self.cities = HelperMethods().removeDuplicatesAndSort(array: self.cities)
                  self.tableView.reloadData()
              }
          }
      }
  }
  
  // MARK: - UISearchController Delegate Methods
  
  func updateSearchResultsForSearchController(searchController: UISearchController) {
      self.filteredVeterinaries.removeAll(keepCapacity: false)
      if let searchBarText = searchController.searchBar.text{
          let searchText = searchBarText.lowercaseString
          // Searching with Veterinary Name and Veterinary City
          self.filteredVeterinaries = self.veterinaries.filter({$0.name?.lowercaseString.rangeOfString(searchText) != nil})
          self.filteredVeterinaries += self.veterinaries.filter({$0.town?.lowercaseString.rangeOfString(searchText) != nil})
          tableView.reloadData()
      }
  }
  </code></pre>
  
  <p>This is the black screen image from iOS 9 simulator same as real device.
  <a href="https://i.stack.imgur.com/6F15i.png" rel="noreferrer"><img src="https://i.stack.imgur.com/6F15i.png" alt="enter image description here"></a></p>
  
  <p>I think its deiniting my tableView when I tap the searchBar and it can't init again. Is this a bug or something ? </p>
  
  <p>How can I solve this problem ?</p>
  
  <p>Thank you ! </p>