【发布时间】:2015-06-30 00:39:53
【问题描述】:
这是一个两部分的问题...
我的问题是....弄清楚如何在第一个表格视图中选择选定的单元格...(来自解析的
pfobjects)保存到一个数组中,然后能够填充那些选定的单元格另一个 tableview 控制器上的单元格....-
如何将第一个表格视图的选定单元格存储到另一个表格视图的一个表格视图单元格中,然后在其上显示一个显示指示器,打开以查看所有添加的单元格?抱歉,这比要更改或添加的具体代码更具概念性……这是我到目前为止所拥有的…… 提前感谢朋友们。
override func tableView(tableView:UITableView, cellForRowAtIndexPath indexPath: NSIndexPath, object: PFObject?) -> 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 < 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 } }
【问题讨论】:
标签: ios swift uitableview parse-platform