我想在UICollectionView
中重新加载一个单元格。
我在UITableView
知道它是这样的:
[self.tableView reloadRowsAtIndexPaths:[NSArray arrayWithObjects:indexPathOfYourCell, nil] withRowAnimation:UITableViewRowAnimationNone];
但是UICollectionView
呢?
答案 0 :(得分:6)
[self.collectionView reloadItemsAtIndexPaths:@[indexPathOfYourCell]];
答案 1 :(得分:0)
对于Swift 4,请使用以下代码:-
self.collectionView.reloadItems(at: [indexPath!])