2016-09-16 8 views
0

私はこのデータを渡すsegueを介して迅速な解決策3で動作していませんか?

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) 
    } 

ようcollectionViewのdidselect方法からデータを渡されている。しかしこの方法

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

が...迅速3のいずれかの解決策を呼び出していませんか? String.substringprepareprepareForSegueまたはString.substringFromIndex

答えて

3

prepareForSegueは、あなたがあなたのようなメソッド名の変更の多くを期待するべきである上記の回答に加えて、この

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

} 
+0

@ Nirav D great right anser –

2

のように記述する必要がSWIFT 3.0に変更されます。明白なメソッド名の終わりは、1番目の引数のラベルに移動されません。

関連する問題