title: Warning: Attempt to present * on * which is already presenting (null)
body: <p>This is my first application for iOS.</p>
  
  <p>So I have a <code>UIVIewController</code> with a <code>UITableView</code> where I have integrated a <code>UISearchBar</code> and a <code>UISearchController</code> in order to filter TableCells to display</p>
  
  <pre><code>override func viewDidLoad() {
      menuBar.delegate = self
      table.dataSource = self
      table.delegate = self
      let nib = UINib(nibName: "ItemCellTableViewCell", bundle: nil)
      table.registerNib(nib, forCellReuseIdentifier: "Cell")
  
      let searchButton = UIBarButtonItem(barButtonSystemItem: .Search, target: self, action: "search:")
      menuBar.topItem?.leftBarButtonItem = searchButton
      self.resultSearchController = ({
          let controller = UISearchController(searchResultsController: nil)
          controller.searchResultsUpdater = self
          controller.dimsBackgroundDuringPresentation = false
          return controller
      })()
      self.table.reloadData()
  }
  </code></pre>
  
  <p>I am using also a modal segue in order to open the element's <code>ViewController</code> where I will display details of the element.</p>
  
  <pre><code>func tableView(tableView: UITableView, didSelectRowAtIndexPath indexPath: NSIndexPath) {
      self.index = indexPath.row
      self.performSegueWithIdentifier("ItemDetailFromHome", sender: self)
  }
  
  override func prepareForSegue(segue: UIStoryboardSegue, sender: AnyObject?) {
      if (segue.identifier == "ItemDetailFromHome") {
          let settingsVC = segue.destinationViewController as! ItemDetailViewController
          settingsVC.parent = self
          if self.isSearching == true  &amp;&amp; self.searchText != nil &amp;&amp; self.searchText != ""  {
              settingsVC.item = self.filteredItems[self.index!]
          } else {
              settingsVC.item = self.items[self.index!]
          }
  
      }
  }
  </code></pre>
  
  <p>That works fine until I try to display the <code>ItemDetailViewController</code> for a filtered element (through the <code>UISearchController</code>).</p>
  
  <p>I have the following message :</p>
  
  <pre><code>Warning: Attempt to present &lt;ItemDetailViewController: *&gt;  on &lt;HomeViewController: *&gt; which is already presenting (null)
  </code></pre>
  
  <p>At every time I am going to the <code>ItemDetailViewController.viewDidLoad()</code> function but after that when the search is activated I have the previous error.</p>
  
  <p>Any idea ? I have tried to use the following async dispatch but without success</p>
  
  <pre><code>func tableView(tableView: UITableView, didSelectRowAtIndexPath indexPath: NSIndexPath) {
      self.index = indexPath.row
      dispatch_async(dispatch_get_main_queue(), { () -&gt; Void in
          self.performSegueWithIdentifier("ItemDetailFromHome", sender: self)
      })
  }
  </code></pre>