title: Presenting UIAlertController when UISearchController is Active
body: <p>I have a UITableView that has a UISearchController in the navigation bar. The table view contents update as the user types in the search bar. When a row is selected another table view controller is pushed to the navigation stack. On that new table view controller, there is bar button item that presents an action sheet. The problem is that when I select a row after using the search controller and then try to open the action sheet on the new table view controller, I get </p>
  
  <pre><code>Attempt to present &lt;UIAlertController: 0x103971800&gt;  on &lt;KYFB_Black_Book.MembersTableViewController: 0x103854c00&gt; which is already presenting (null)
  </code></pre>
  
  <p>If I select a row from the first controller without searching and then open the action sheet on the second controller, everything works fine.</p>
  
  <p>In viewDidLoad() of first controller:</p>
  
  <pre><code>searchController = UISearchController(searchResultsController: nil)
          searchController.searchResultsUpdater = self
          searchController.searchBar.tintColor = .white
          searchController.dimsBackgroundDuringPresentation = false
          searchController.hidesNavigationBarDuringPresentation = false
          let searchField = searchController.searchBar.value(forKey: "searchField") as? UITextField
          searchField?.textColor = .white
  
          if #available(iOS 11.0, *) {
              navigationItem.searchController = searchController
              navigationItem.hidesSearchBarWhenScrolling = false
          } else {
              searchController.searchBar.frame = CGRect(x: 0, y: 0, width: 200.0, height: 44.0)
              searchField?.textColor = .black
              searchController.searchBar.tintColor = .black
              navigationItem.titleView = searchController.searchBar
          }
  </code></pre>
  
  <p>Updating results based on search text:</p>
  
  <pre><code>@available(iOS 8.0, *)
      func updateSearchResults(for searchController: UISearchController) {
          filteredCountyNames.removeAll(keepingCapacity: false)
          let searchPredicate = NSPredicate(format: "SELF CONTAINS[c] %@", searchController.searchBar.text!)
          let array = (countyNames as NSArray).filtered(using: searchPredicate)
          filteredCountyNames = array as! [String]
          tableView.reloadData()
      }
  </code></pre>
  
  <p>In second controller, presenting the alert controller:</p>
  
  <pre><code>@objc func actionTapped() {
          let emailAlert = UIAlertController(title: "Contact All Committee Members", message: "", preferredStyle: .actionSheet)
          let cancelAction = UIAlertAction(title: "Cancel", style: .destructive, handler: { (action) in
              print("Cancel")
              })
          let emailAction = UIAlertAction(title: "Email", style: .default, handler: { (action) in
              self.emailAll()
              })
          let messageAction = UIAlertAction(title: "Text Message", style: .default, handler: { (action) in
              self.textAll()
              })
  
          emailAlert.view.tintColor = UIColor(red: 28.0 / 255.0, green: 75.0 / 255.0, blue: 136.0 / 255.0, alpha: 1)
          emailAlert.addAction(emailAction)
          emailAlert.addAction(messageAction)
          emailAlert.addAction(cancelAction)
          present(emailAlert, animated: true, completion: nil)
      }
  </code></pre>