我有一个集合视图,我声明了不同的项目大小
- (CGSize)collectionView:(UICollectionView *)collectionView
layout:(UICollectionViewLayout*)collectionViewLayout
sizeForItemAtIndexPath:(NSIndexPath *)indexPath {
FeedItem *item = [_imagesLinkArray objectAtIndex:indexPath.row];
return CGSizeMake(250, 200*item.sizeFactor);
}
Run Code Online (Sandbox Code Playgroud)
当正在重复使用单元格时,正在使用已重新collectionView:cellForItemAtIndexPath:
计划的项目大小而不是指定的项目大小来呈现该单元格sizeForItemAtIndexPath:.
有任何想法吗?