title: valueForUndefinedKey:]: this class is not key value coding-compliant for the key imgSelect Swift
body: <p>Receiving error: valueForUndefinedKey:]: this class is not key value coding-compliant for the key imgSelect</p>
  
  <p>I have a tableview with that is editable.. When selecting cell, it takes you to edit information. Everything works great, except the image. User can save image, image is displayed in tableview, but when going back to edit, it crashes. Here is the poorly written code:</p>
  
  <p>without trying to reload the image to edit, everything else works. The image is saved to database and is displayed in tableview..</p>
  
  <pre><code>var existingItem: NSManagedObject!
  
  override func viewDidLoad() {
  
      super.viewDidLoad()
  
  // Reload data to edit
  if existingItem {
  
      txtPTitle.text = project
      txtPDesc.text = desc
      txtSDate.text = sdate
      txtEDate.text = edate
  
  }
  </code></pre>
  
  <p>but when I add the following to load image when editing tablecell</p>
  
  <pre><code>// Reload data back into form
  if existingItem {
  
      txtPTitle.text = project
      txtPDesc.text = desc
      txtSDate.text = sdate
      txtEDate.text = edate
  
      var data: NSManagedObject = NSManagedObject()
      let imageData:NSData = data.valueForKeyPath("projectImage") as NSData
      let projectImage:UIImage = UIImage(data: imageData)
      println("we have an image")
  
      imgSelect.image = projectImage
  </code></pre>
  
  <p>}</p>
  
  <p>it crashes with the following error.</p>
  
  <pre><code>'NSUnknownKeyException', reason: '[&lt;_NSZeroData 0x7fe7f1c3b020&gt; valueForUndefinedKey:]: this class is not key value coding-compliant for the key imgSelect.'
  </code></pre>