[英]UICollectionView cells resizing when deleting items with estimatedItemSize
[英]UICollectionView empty items are coming while deleting the cells
我正在使用具有自定義單元格的單元格視圖,這些單元格具有長按鍵,當我通過拖放刪除特定項目時,其余項目未正確排列,集合視圖中有空項。
刪除后我正在使用下面的代碼
[array removeObjectAtIndex:currentIndexpath.item];
[CollectionView performBatchUpdates:^{
[CollectionView deleteItemsAtIndexPaths:@[currentIndexpath]];
}
completion:^(BOOL finshed){
[CollectionView reloadData];
}];
您必須從集合數組中刪除該內容,並且需要重新加載集合視圖。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.