title: Segue to next view controller after successful sign up
body: <p>I've searched and searched and searched but not found a solution. The sign up works but will not segue to the next view controller. Heres my code:</p>
  
  <pre><code>import UIKit
  import Parse
  import Bolts
  
  class SignUpVC: UIViewController, UIImagePickerControllerDelegate, UINavigationControllerDelegate {
  
  @IBOutlet weak var profilePictureIV: UIImageView!
  @IBOutlet weak var firstNameTF: UITextField!
  @IBOutlet weak var lastNameTF: UITextField!
  @IBOutlet weak var newUsernameTF: UITextField!
  @IBOutlet weak var newPasswordTF: UITextField!
  @IBOutlet weak var emailTF: UITextField!
  @IBOutlet weak var phoneNumberTF: UITextField!
  
  @IBAction func setProfilePicture(sender: AnyObject) {
      let myPickerController = UIImagePickerController()
      myPickerController.delegate = self
      myPickerController.sourceType = UIImagePickerControllerSourceType.PhotoLibrary
      self.presentViewController(myPickerController, animated: true, completion: nil)
  }
  
  @IBAction func signUpButton(sender: AnyObject) {
      let spinner: UIActivityIndicatorView = UIActivityIndicatorView(frame: CGRectMake(0, 0, 150, 150)) as UIActivityIndicatorView
  
      if firstNameTF.text != "" &amp;&amp;  lastNameTF.text != "" &amp;&amp; newUsernameTF.text != "" &amp;&amp; newPasswordTF.text != "" &amp;&amp; emailTF.text != "" &amp;&amp; phoneNumberTF.text != "" {
  
          let newUser = PFUser()
  
          if let profilePictureImage = profilePictureIV?.image {
              let profilePicture = UIImageJPEGRepresentation(profilePictureImage, 1)!
              let profilePictureImageFile = PFFile(data: profilePicture)
              newUser["profilePicture"] = profilePictureImageFile
          }
          newUser["firstName"] = firstNameTF.text
          newUser["lastName"] = lastNameTF.text
          newUser.username = newUsernameTF.text
          newUser.password = newPasswordTF.text
          newUser.email = emailTF.text
          newUser["phoneNumber"] = phoneNumberTF.text
  
          newUser.signUpInBackgroundWithBlock {
              (succeeded: Bool, error: NSError?) -&gt; Void in
              if let error = error {
                  spinner.startAnimating()
                  self.alert("Opps", textMessage: (error.localizedDescription))
              } else {
                  spinner.startAnimating()
                  self.alert("Congratualtion!", textMessage: "Success, your account has been created.")
                  self.performSegueWithIdentifier("showMessages", sender: self)
              }
          }
      } else {
          alert("Hmm...", textMessage: "If you want an account, please fill in the blanks.")
      }
  }
  
  override func viewDidLoad() {
      super.viewDidLoad()
      // Do any additional setup after loading the view.
  }
  
  override func didReceiveMemoryWarning() {
      super.didReceiveMemoryWarning()
      // Dispose of any resources that can be recreated.
  }
  
  override func viewWillAppear(animated: Bool) {
      self.navigationController!.navigationBar.hidden = false
  }
  
  func imagePickerController(picker: UIImagePickerController, didFinishPickingMediaWithInfo info: [String : AnyObject]) {
      profilePictureIV.image = info[UIImagePickerControllerOriginalImage] as? UIImage
      self.dismissViewControllerAnimated(true, completion: nil)
  }
  
  func alert(textTitle: String, textMessage: String) {
      let alertController = UIAlertController(title: textTitle, message: textMessage, preferredStyle: .Alert)
      alertController.addAction(UIAlertAction(title: "OK", style: .Default, handler: nil))
      self.presentViewController(alertController, animated: true, completion: nil)
  }
  
  
  /*
  // MARK: - Navigation
  
  // In a storyboard-based application, you will often want to do a little preparation before navigation
  override func prepareForSegue(segue: UIStoryboardSegue, sender: AnyObject?) {
  // Get the new view controller using segue.destinationViewController.
  // Pass the selected object to the new view controller.
  }
  */
  
  }
  </code></pre>
  
  <p>If i play the <code>self.performSegueWithIdentifier("showMessages", sender: self)</code> line anywhere else then when i run the program and press the signup button it will directly go to in the messages view controller without any signup required.</p>