title: Bypass Login View if Parse User is Logged In
body: <p>I am trying to create a function where upon app launch, the app checks to see if there is a Parse user currently logged in, and if this is true, then the user should bypass the login screen and taken to my view located within a tabbed view controller. If there is not user currently logged in, then open the login view, which opens on app load by default. I took a crack at this functionality by creating an if statement within the viewWillAppear function on my login view and if this is true, then <code>instantiateViewControllerWithIdentifier()</code>, but my app crashes immediately due to no identifier with my name. </p>
  
  <pre><code>reason: 'Storyboard (&lt;UIStoryboard: 0x7ffbf3e82190&gt;) doesn't contain a view controller with identifier 'ProfileSettingsViewController'
  </code></pre>
  
  <p>Now I might be missing something, but where do I set the identifier for a view controller? Or is my Class name the identifier as I currently assume?</p>
  
  <p>In a related question, is this the best way to achieve what I am looking to do?</p>
  
  <p>Here is my login controller logic:</p>
  
  <pre><code>override func viewWillAppear(animated: Bool) {
  
          var currentUser = PFUser.currentUser()
  
          if currentUser != nil {
             self.storyboard?.instantiateViewControllerWithIdentifier("ProfileSettingsViewController")   
          }        
  }
  </code></pre>
  
  <p>Here is the view that should open if user is already logged in <code>ProfileSettingsViewController.swift</code>:</p>
  
  <pre><code>import UIKit
  
  class ProfileSettingsViewController: UIViewController {
  
      override func viewWillAppear(animated: Bool) {
          self.tabBarController?.navigationItem.setHidesBackButton(true, animated:true);
  
          //self.tabBarController?.navigationItem.title = "Profile Settings"
          self.navigationController?.navigationItem.title = "ffff"
      }
  
      override func viewDidLoad() {
          super.viewDidLoad()
      }
  
      override func didReceiveMemoryWarning() {
          super.didReceiveMemoryWarning()
          // Dispose of any resources that can be recreated.
      }
  
      @IBAction func logoutButton(sender: AnyObject) {
          PFUser.logOut()
          var currentUser = PFUser.currentUser()
          self.performSegueWithIdentifier("userLoggedOut", sender: self)
          self.navigationController?.setNavigationBarHidden(self.navigationController?.navigationBarHidden == false, animated: true)
  
      }
  
      /*
      // 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>