title: Swift EXC_BREAKPOINT when assigning viewcontroller to variable in prepareForSegue
body: <p>Im getting an error when trying to perform a variable assignment with my destinationViewController.</p>
  
  <p>The error message is this:
  Thread 1: EXC_BREAKPOINT (code=EXC_I386_BPT, subcode=0x0)</p>
  
  <p>This in my prepareForSegue function.</p>
  
  <pre><code>override func prepareForSegue(segue: UIStoryboardSegue!, sender: AnyObject!) {
      if segue.identifier == "LoginSegue"{
  
          let vc = segue.destinationViewController as LoggedInViewController
          vc.email = emailTextfield.text
  
      }
  }
  </code></pre>
  
  <p>In the other file it looks like this.</p>
  
  <pre><code>var email: String?
  </code></pre>
  
  <p>which is at the top. 
  Then this:</p>
  
  <pre><code>override func viewDidLoad() {
      super.viewDidLoad()
  
      println("Email is:")
      println(email)
      println("Email was")
  }
  </code></pre>
  
  <p>But i never come into the second file.</p>
  
  <p>It is the line let vc = segue.destinationViewController as LoggedInViewController that is marked with error.</p>
  
  <p>Both swift files are connected to navigation controllers.</p>
  
  <p>I dont know what more you need, but I will of course post all code you need to understand!</p>
  
  <p>Thanks!</p>