title: Table view Help…..selected cells from one table view passed to another table view swift
body: <p><img src="https://i.stack.imgur.com/WDvEJ.png" alt="enter image description here"></p>
  
  <p>This is a two part question...</p>
  
  <ol>
  <li><p>My problem is....figuring out how to have the selected cells on the first table view...(which are <code>pfobjects</code> from parse) save into an array and then be able to populate those selected cells on another tableview controller....</p></li>
  <li><p>How can you store the selected cells of the first table view into ONE table view cell on the other tableview and then have a disclosure indicator on it that opens up to see all the added cells? sorry this is more conceptual than concrete code to change or add to... here is what i have so far...
  thanks in advance friends.</p>
  
  <pre><code>override func tableView(tableView:UITableView, cellForRowAtIndexPath indexPath: NSIndexPath, object: PFObject?) -&gt; PFTableViewCell {
  
      var cell = tableView.dequeueReusableCellWithIdentifier("cell") as! PFTableViewCell!
      if cell == nil {
         cell = PFTableViewCell(style: UITableViewCellStyle.Default, reuseIdentifier: "cellIdentifier")
      }
      // Extract values from the PFObject to display in the table cell
  
      if let customerFirstName = object?["customerName"] as? String {
         cell?.textLabel?.text = customerFirstName
      }
  
     if let customerStreetAddress = object?["customerStreetAddress"] as? String {
         cell?.detailTextLabel?.text = customerStreetAddress
     }
  
     if let indexPaths = tableView.indexPathsForSelectedRows() {
        for var i = 0; i &lt; indexPaths.count; ++i {
  
           var thisPath = (indexPaths as! [NSIndexPath])[i]
           var cell = tableView.cellForRowAtIndexPath(thisPath)
           if let cell = cell {
  
             self.addedPoolarray.append(cell)
             // Do something with the cell
            // If it's a custom cell, downcast to the proper type
           }
     }
  }
  
  func prepareForSegue(segue: UIStoryboardSegue, sender: AnyObject?) {
      if segue.identifier == "toRoutesVc" {
          let destination = segue.destinationViewController as! UITableViewController
  
      }
   }
  </code></pre></li>
  </ol>