title: Getting nil when trying to convert (NSData from Core Data) to UIImage
body: <p>I set up my core data as follow: </p>
  
  <pre><code>    let appDel: AppDelegate = UIApplication.sharedApplication().delegate as! AppDelegate
  
  
  
  func saveIntoCoreData(upload: NSData) {
  
      let context = (UIApplication.sharedApplication().delegate as! AppDelegate).managedObjectContext
  
      var pendingImage = NSEntityDescription.insertNewObjectForEntityForName("PendingImage", inManagedObjectContext: context!) as! PendingImageClass
  
      pendingImage.pendingImageData = NSData(data: upload)
  
      var savingError: NSError?
      if context!.save(&amp;savingError) {
          println("saved")
      } else {
  
          if let error = savingError{
              println("cannot save. error = \(error) ")
          }
  
      }
  
  }
  </code></pre>
  
  <p>I then pass: </p>
  
  <pre><code>       let imageData: NSData! = UIImageJPEGRepresentation(pickedImage.image!, 1.0)
  
         saveIntoCoreData(imageData!)
  </code></pre>
  
  <p>I then try to fetch (fetch the results in a TabBarController, different controller from where I save NSData into Core Data) by: </p>
  
  <pre><code>var pendingImages = [PendingImageClass]()
  
  func fetchLog() {
  
      var requestError: NSError?
  
      let fetchRequest = NSFetchRequest(entityName: "PendingImage")
      if let fetchResults = context!.executeFetchRequest(fetchRequest, error: &amp;requestError) as? [PendingImageClass] {
          pendingImages = fetchResults
      }
  }
  </code></pre>
  
  <p>Performed the following in ViewDidLoad: </p>
  
  <pre><code>let pendingImageDataFromFetch: NSData! = NSKeyedArchiver.archivedDataWithRootObject(pendingImages[0])
  
      let pendingImageDataFromFetchInImageForm: UIImage? = UIImage(data: pendingImageDataFromFetch)
  </code></pre>
  
  <p>When I try to display pendingImageDataFromFetchInImageForm in an imageView, I am getting an error. </p>
  
  <p>I tried to println to see what is it that isn't going through, and it appears that I am being returned nil for pendingImageDataFromFetch. </p>
  
  <p>Please advise on what is it that I'm missing. Thanks!!!</p>