UICollectionView: different size items is not calculated on reused items

前端 未结 4 1010
北海茫月
北海茫月 2021-02-13 22:27

I have a collection view with varied item sizes which i declare in

- (CGSize)collectionView:(UICollectionView *)collectionView
                  layout:(UIColle         


        
4条回答
  •  长情又很酷
    2021-02-13 22:45

    A collection view seems to recompute items less often than a UITableView. You have to inform the collection view about most of the changes to the underlying model, e.g. by calling [collectionView reloadData] or [collectionView insertItemsAtIndexPaths:indexPaths].

提交回复
热议问题