title: Swift - Warning when presenting alert inside prepareForSegue method
body: <p>I keep getting a following warning when I present UIAlertController:</p>
  
  <blockquote>
    <p>2016-08-16 13:29:48.138 MyProject[602:98207] pushViewController:animated: called on  while an existing transition or presentation is occurring; the navigation stack will not be updated.</p>
  </blockquote>
  
  <p>here is the relevant piece of code:</p>
  
  <pre><code>  override func prepareForSegue(segue: UIStoryboardSegue, sender: AnyObject?) {
      if segue.identifier == "toUserData" &amp;&amp; didSelect
      {
          let vc:UserDataViewController = segue.destinationViewController as! UserDataViewController
          vc.unitIndex = self.selectedIndex - 1
      }
      else
      {
          self.showAlert()
          return
      }
  
  }
  
      func showAlert()
      {
          let alert =  UIAlertController(title: "Error", message: "Are you sure that you set units properly?", preferredStyle: .Alert)
          alert.addAction(UIAlertAction(title: "OK", style: .Default) { _ in })
      self.presentViewController(alert, animated: true, completion: nil)
      }
  
  }
  </code></pre>
  
  <p>I used this kind of structure before in other project and I don't remember getting such warining.</p>
  
  <p>Also, I don't really know why I get it, because presenting alert is not interrupting any other action regarding transitions.</p>
  
  <p>Thanks in advance</p>