Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/ios/118.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ios Xcode在UiCollectionView中只重新加载一个单元格_Ios_Uicollectionview_Uicollectionviewcell - Fatal编程技术网

Ios Xcode在UiCollectionView中只重新加载一个单元格

Ios Xcode在UiCollectionView中只重新加载一个单元格,ios,uicollectionview,uicollectionviewcell,Ios,Uicollectionview,Uicollectionviewcell,我只想在UICollectionView中重新加载一个单元格 我知道在UITableView中是这样的: [self.tableView reloadRowsAtIndexPaths:[NSArray arrayWithObjects:indexPathOfYourCell, nil] withRowAnimation:UITableViewRowAnimationNone]; 但是UICollectionView呢?使用以下方法: 对于swift 4,请使用以下代码:- self.colle

我只想在
UICollectionView
中重新加载一个单元格

我知道在
UITableView
中是这样的:

[self.tableView reloadRowsAtIndexPaths:[NSArray arrayWithObjects:indexPathOfYourCell, nil] withRowAnimation:UITableViewRowAnimationNone];
但是
UICollectionView
呢?

使用以下方法:


对于swift 4,请使用以下代码:-

self.collectionView.reloadItems(at: [indexPath!])
可能重复的
self.collectionView.reloadItems(at: [indexPath!])