segue parse data from a tableviewcontroller to another
<p>I have a tableview with a search bar. The search bar returns PFUsers whose usernames contain the text in the search bar. That part works fine and the users fetched are displayed in the tableview. When the user tap on a tableview cell, I want to segue to another view controller which contains a table of images that the user tapped has posted. I set up the segue and below are my codes:</p>

<pre><code>//usersSearched contains all the PFUsers whose usernames match the text in search bar 
       var usersSearched = [PFObject]()

override func prepareForSegue(segue: UIStoryboardSegue, sender: AnyObject?) {

// showImages is the segue triggered when cell is tapped
    if segue.identifier == "showImages" {

        let pointInTable: CGPoint = sender!.convertPoint(sender!.bounds.origin, toView: searchResultTable)
        let cellIndexPath = searchResultTable.indexPathForRowAtPoint(pointInTable)

        let showImages = segue.destinationViewController as! ShowImagesViewController

        let userSelected = usersSearched[cellIndexPath!.row]

        let getImagesQuery = PFQuery(className: "allImages")

        getImagesQuery.whereKey("userId", equalTo: userSelected["userId"]!)

        getImagesQuery.findObjectsInBackgroundWithBlock { (posts, error) -&gt; Void in

            if let posts = posts {

                showImages.pictureFile.removeAll(keepCapacity: true)

                for post in posts {

                    if let file = post["imageFile"] as? PFFile {

                        showImages.pictureFile.append(file)

                    } else {

                        let replacementImageData = UIImageJPEGRepresentation(UIImage(named: "whiteBackground.jpg")!, 0.8)

                        let replacementImageFile = PFFile(name: "replacementImageFile.jpeg", data: replacementImageData!)

                        showImages.pictureFile.append(replacementImageFile)
                    }
                  }
                }
              }
            }
</code></pre>

<p>The above codes are from the view controller containing the search bar and tableview</p>

<p>Below are my codes for the view controller which display the images:</p>

<pre><code>    var pictureFile = [PFFile]()

    @IBOutlet var imageTableView: UITableView!


func numberOfSectionsInTableView(tableView: UITableView) -&gt; Int {

    return 1
}

func tableView(tableView: UITableView, numberOfRowsInSection section: Int) -&gt; Int {

    return pictureFile.count
}


func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -&gt; UITableViewCell {

        let cell = tableView.dequeueReusableCellWithIdentifier("imageCell") as! imageTableViewCell

        pictureFile[indexPath.row].getDataInBackgroundWithBlock { (fileData, error) -&gt; Void in

            if let downloadedImage = UIImage(data: fileData!) {

                cell.imageHere.image = downloadedImage
            }
        }

        return cell
    }
</code></pre>

<p>So my problem is that the images appear do not belong to the PFUser tapped. And an unwind segue is provided automatically on the view controller that displays the images with a typical back button on nav bar. When I clicked on it, it does segue back to the search controller, however, when I type in the search bar to search again, it either returns nothing or a PFUser that do not contain the search bar text. I tried my best explaining everything, I know it sound too confusing, but please help! thanks</p>