title: SWIFT: Push segue is resulting in a modal segue instead
body: <p>In my storyboard, a modal segue takes the user to the Sign In screen (from the main screen). Then, I added a PUSH segue from the Sign Up screen to the next screen (Create Profile), which is embedded in a Navigation Controller (The Create Profile screen is the one with the "test" button included). </p>
  
  <p><a href="https://i.stack.imgur.com/LzLyV.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/LzLyV.png" alt="enter image description here"></a></p>
  
  <p><a href="https://i.stack.imgur.com/VrHDS.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/VrHDS.png" alt="enter image description here"></a></p>
  
  <p>The segue to the Sign Up screen works fine. However, when a user enters their credentials and clicks "Sign Up", it does take them to the correct screen, but using a modal segue vs. a push segue. I have no idea why this is happening. </p>
  
  <p>Here is my Sign Up View Controller code. Any help would be greatly appreciated!</p>
  
  <pre><code>import UIKit
  import Parse
  
  class SignInViewController: UIViewController {
  
  @IBOutlet weak var usernameField: UITextField!
  @IBOutlet weak var passwordField: UITextField!
  
  @IBAction func signInButton(sender: AnyObject) {
  
      PFUser.logInWithUsernameInBackground(usernameField.text!, password:passwordField.text!) {
          (user: PFUser?, error: NSError?) -&gt; Void in
          if user != nil {
  
              //self.performSegueWithIdentifier("loginUser", sender: self)
  
              self.usernameField.text = ""
              self.passwordField.text = ""
  
          } else {
  
              if let errorString = error?.userInfo["error"] as? String {
  
                  self.displayAlert("Login Failed", message: errorString)
  
              }
  
          }
      }
  
  }
  
  @IBAction func signUpButton(sender: AnyObject) {
  
      if usernameField.text == "" || passwordField.text == "" {
  
          self.displayAlert("Missing Field(s)", message: "Username and password are required")
  
      } else {
  
          let user = PFUser()
          user.username = usernameField.text
          user.password = passwordField.text
  
          user.signUpInBackgroundWithBlock {
              (succeded, error) -&gt; Void in
  
              if let error = error {
                  if let errorString = error.userInfo["error"] as? String {
  
                      self.displayAlert("Sign Up Failed", message: errorString)
  
                  }
  
  
              } else {
  
                  self.performSegueWithIdentifier("SignUpToCreate", sender: self)
  
                  self.usernameField.text = ""
                  self.passwordField.text = ""
  
              }
          }
      }
  }
  
  //Dismiss the sign in screen
  @IBAction func closeButton(sender: AnyObject) {
  
      self.dismissViewControllerAnimated(true, completion: nil)
  
  }
  
  override func viewDidLoad() {
      super.viewDidLoad()
  
      //Format the text fields
      textFieldUI()
  
  
  }
  
  override func didReceiveMemoryWarning() {
      super.didReceiveMemoryWarning()
  
  }
  
  
  
  
  
  
  
  
  //Display alert function
  func displayAlert(title: String, message: String) {
  
      let alert = UIAlertController(title: title, message: message, preferredStyle: UIAlertControllerStyle.Alert)
      alert.addAction(UIAlertAction(title: "OK", style: UIAlertActionStyle.Default, handler: nil))
      self.presentViewController(alert, animated: true, completion: nil)
  
  }
  
  //Textfield UI
  func textFieldUI() {
  
      passwordField.leftView = UIView(frame: CGRectMake(0, 0, 8, 0))
      passwordField.leftViewMode = .Always
      usernameField.leftView = UIView(frame: CGRectMake(0, 0, 8, 0))
      usernameField.leftViewMode = .Always
  
  }
  
  }
  </code></pre>