Basically what I'm trying to do is take an image from Parse and store it in a variable, which I can then set to an image view in a tableViewCell.

I can't figure out how to store the images once I get them from Parse.

Here's my code:

```
import UIKit
import Parse
import Bolts

class YourEvents: UIViewController, UITableViewDataSource, UITableViewDelegate {

    @IBOutlet weak var tableView: UITableView!
    var currentuser = PFUser.currentUser()?.username

    //array
    var testArray = [String]()

    var testdecr = [String]()

    var imagestored = UIImage()

    override func viewDidLoad() {
        super.viewDidLoad()
        var query = PFQuery(className:"Companies")
         let pUserName = PFUser.currentUser()?["username"] as? String

        query.whereKey("createdby", equalTo:"\(pUserName)")
        // let runkey = query.orderByAscending("companyname")
        query.findObjectsInBackgroundWithBlock{
            (objects: [PFObject]?, error: NSError?) -> Void in

            if error == nil {
                //do something with the found objects
                if let objects = objects as [PFObject]! {
                    for object in objects {

                        let load = object.objectForKey("companyname") as! String
                        self.testArray .append(load)

                        print(self.testArray)

                        let load2 = object.objectForKey("companydescription") as! String
                        self.testdecr.append(load2)

                        print(self.testdecr)

                        //let images: PFFile = object["imagefile"] as! PFFile

                     if let userPicture = ["picture"] as? PFFile {
                        userPicture.getDataInBackgroundWithBlock { (imageData: NSData?, error: NSError?) -> Void in
                            if (error == nil) {
                                self.imagestored.image = UIImage(data:imageData)
                            }
                        }
                        }
                    }

                }
            } else {
                //log details of failure
                print("Error: \(error!) \(error?.userInfo) ")

            }

        }

        // reload  UIViewController and UITabkeView
        sleep(3)

        do_table_refresh()
    }

    func do_table_refresh () {
        dispatch_async(dispatch_get_main_queue(),  {
            self.tableView.reloadData()
            return
        })
    }

    override func didReceiveMemoryWarning() {
        super.didReceiveMemoryWarning()
        // Dispose of any resources that can be recreated.
    }

    func numberOfSectionsInTableView(tableView: UITableView) -> Int {
        return 1
    }

    func tableView(tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
        return testArray.count
    }

    func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell {
        let cell = tableView.dequeueReusableCellWithIdentifier("yourstartups", forIndexPath: indexPath) as! YourStartupsCell
        cell.lbTitle!.text = self.testArray[indexPath.row]
        cell.lbDescription!.text = self.testdecr[indexPath.row]

        return cell
    }

}

```

[![my code](https://i.stack.imgur.com/WZ3Ez.png)](https://i.stack.imgur.com/WZ3Ez.png)