CHTCollectionViewWaterfallLayout icon indicating copy to clipboard operation
CHTCollectionViewWaterfallLayout copied to clipboard

sizeForItemAtIndexPath problem

Open y0unghe opened this issue 9 years ago • 2 comments

I implemented the CHTCollectionViewDelegateWaterfallLayout protocol

- (CGSize)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout *)collectionViewLayout sizeForItemAtIndexPath:(NSIndexPath *)indexPath {
    Topic *topic = topics[indexPath.row];
    NSLog(@"%@ height: %@", topic.topicTitle, @(size.height));
    return size;
}

But when I launch the simulator, the topic according to the actual cell's height in collection view is not the size which I implemented in the protocol. The NSLog outputs:

title: teipete/PSTCollectionView height: 89.404
title: Jamztang/CSStickyHeaderFlowLayout height: 106.106

But in the simulator the cell's height for teipete/PSTCollectionView is 106.106, and the height for Jamztang/CSStickyHeaderFlowLayout is 89.404.

It seems both cells exchange its height. How is that possible?

y0unghe avatar Jul 11 '15 09:07 y0unghe

Seems i'm facing the same issue.

Neogene avatar Aug 10 '15 21:08 Neogene

This problem has been solved yet I have encountered such a problem

shenyuan000 avatar Nov 11 '15 08:11 shenyuan000