通过数据通过在swift中不工作的任何解决scheme?

我已经从collectionView didSelect方法传递数据这样

  func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) { let dicttemp = (arrRespProduct?.object(at: indexPath.row))! as! NSDictionary dicData = NSMutableDictionary(dictionary: dicttemp) performSegue(withIdentifier: GlobalConstant.segueIdentofier.productDetail, sender: self) } 

但方法

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

是不是在迅速3 …任何解决scheme?

prepareForSegue在swift 3.0中改变,所以你需要这样写

 override func prepare(for segue: UIStoryboardSegue, sender: Any?){ } 

除了上面的答案,你应该期望方法名称的很多变化,如: prepareForSegue prepareString.substringFromIndexString.substring 。 明显的方法名称结尾被忽略/移动到第一个参数的标签。