【发布时间】:2016-01-16 14:53:55
【问题描述】:
我正在尝试将 segue 数据从 UIViewController 转移到 UITableViewController。
UIViewController 中的数据来自 PFTableViewController,我想将该数据传递给另一个 TableViewController。
使用didSelect 方法传递给ViewController,但我不知道如何从viewController 切换到TableViewController。
override func tableView(tableView: UITableView, didSelectRowAtIndexPath indexPath: NSIndexPath) {
let destinationToFVC:ViewController = self.storyboard!.instantiateViewControllerWithIdentifier("FVCont") as! ViewController
if let indexPath = self.tableView.indexPathForSelectedRow {
let row1 = Int(indexPath.row)
destinationToFVC.currentObject = objects?[row1] as! PFObject!
}
navigationController?.pushViewController(destinationToFVC, animated: true)
}
我是编程新手。
【问题讨论】:
标签: ios swift uitableview