0
嘿傢伙我有一種情況我不能籠罩我的頭。我將如何計算Segued View Controller的indexPath?當我從我的CollectionViewCell
繼續時,我從單元格獲得索引數據。到現在爲止還挺好。計算indexPath然後重新加載數據?斯威夫特3
func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) {
let sales: Sales!
let tSale: [Sale] = revenueData.tSale
sales = tSales[indexPath.row]
DispatchQueue.main.async {
self.performSegue(withIdentifier: "detailedView", sender: sales)
}
}
`
現在,我需要重新加載數據到從下一indexPath從第二視圖控制器內呈現信息。我想我可能需要獲取它必須重新加載到另一個索引中的indexPath數據。我怎樣才能做到這一點?