title: Using shouldPerformSegueWithIdentifier( ) method in Swift
body: <p>I am trying to use swift's shouldPerformSegueWithIdentifier() method, but it accepts 2 arguments. These are (identifier: String!, sender:AnyObject)</p>
  
  <p>My main goal is to execute the code when pressing a login button in my storyboard, and depending of a series of checks return TRUE or FALSE, depending if whether the correct username and password were provided. So here are my questions:</p>
  
  <ol>
  <li><p>What am I supposed to use as the identifier? Apple's documentation it explains that the identifier is a string that identifies the triggered segue. So suppose that my segue had the name of loginSegueProcess. How could I use it in my ViewController tat is assigned to my UIView? The thing is that I declare the method in my code and it requires me to specify both arguments (identifier &amp; sender). How could I provide the arguments?</p></li>
  <li><p>Will this method actually fulfill my needs? By that I mean if it will indeed stop the segue transition whenever my Login button is clicked and depending on whether the correct credentials were provided it is going to take you to the next View or it will show, say for  example, an AlertView.</p></li>
  </ol>
  
  <p>Finally, I was thinking that the performSegueWithIdentifier(args) method would help me as well. Does anybody know the difference between them? </p>
  
  <p>Thanks a lot in advance!</p>