准备segue ...用指针?

时间:2015-08-07 12:37:41

标签: arrays swift pointers parse-platform

var routes:[PFObject] = [PFObject]()

func getRoutes() {

let query = PFQuery(className: "PoolRoute")
query.includeKey("selectedCustomer")
query.findObjectsInBackgroundWithBlock { (objects, error) -> Void in

  if let objects = objects as? [PFObject] {

    self.routes = objects
    self.tableView.reloadData()

这些对象有一个名为" selectedCustomer"那是一个充满指针对象.....我想转到另一个tableview控制器并显示所选单元格中的指针对象......

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

  if segue == "toRoutesDetailVC" {

    let nav = segue.destinationViewController as! PoolRouteDetailVC
    if let indexPath = self.tableView?.indexPathForSelectedRow {

  nav.currentObject = (self.routes[indexPath.row]["selectedCustomer"] as [PFObject])  

//'() - > NSIndexPath&#39?;没有名为' row'的成员 //我猜它不是正确的语法...不完全确定如何编写代码以使其发送到数组到detailViewController。提前谢谢!

enter image description here

0 个答案:

没有答案