title: Conditional Segue in Swift
body: <p>I want to do a "connexion" button in my app. And when you tap on it, it will open a new page if you have correct login.</p>
  
  <p>But, I read that we can't undo a segue, I suppose I need to call it manually. Do you have an idea ?</p>
  
  <p>I still tried something like this : </p>
  
  <pre><code>override func prepareForSegue(segue: UIStoryboardSegue, sender: AnyObject) {
      if checkLog == true
      {
       //finish   
      }
      else
     {
      // undo
     }
  }
  
  @IBAction func ConexTAP(sender: UIButton)
  {
   //check login
  }
  </code></pre>