從VC

2014-12-13 67 views
0
更新單個UICollectionviewCell

因此,我有一個VC允許ppl向collectionview中列出的任何用戶發送好友請求,並且我希望在請求等待時從一個添加按鈕切換到加載指示器響應,但我不知道如何做到這一點,而不調用[self.collectionview reloadData],有沒有辦法改變單個單元格w的外觀。重新加載整個collectionview?從VC

回答

0

如果你知道UICollectionViewCell指針 - 呼叫

NSIndexPath *indexPath = [self.collectionView indexPathForCell:cell]; 
[self.collectionView reloadItemsAtIndexPaths:@[indexPath]]; 
0

使用方法reloadItemsAtIndexPaths原樣

[self.collectionView reloadItemsAtIndexPaths:@[indexPathOfYourCell]];