steipete/PSTCollectionView — pull request #177 by loganmoseley (2013-01-21 20:47:11+00:00)
Title: -[PSTCollectionViewFlowLayout updateItemsLayout] changes to correct contentSize.

There was a mismatch in PSTCollectionView.contentSize and UICollectionView.contentSize. I made two changes.

1. I removed the minimum `contentSize` setter in `-[PSTCollectionViewFlowLayout updateItemsLayout]`. Basically, I'm seeing that with a contentSize the full height of the bounds, I can scroll the collection into the contentInset and leave it there (which is appropriate for that contentSize). That's with both `alwaysBounceVertical=YES` and NO. By removing @matej's patch ([Issue #117](https://github.com/steipete/PSTCollectionView/issues/117)), the contentSize and scrolling functionality almost perfectly matches UICollectionView, with or without alwaysBounce. *See change 2 for perfect match.*

After removing that patch, I'm not seeing what @matej saw. That issue was probably fixed by something else (or I'm incorrectly replicating his test, which appears to just be having fewer items than would fill the view).

Console prints comparing UICollectionView and PSTCollectionView, with PSTFlowLayout having the minimum `contentSize` setter, at https://gist.github.com/4588668

![ContentInset PSTCollectionView](https://f.cloud.github.com/assets/377298/84189/fb2a9bde-6403-11e2-8e0b-85cdb90dea2b.png)

2. Added sectionMargin to contentSize in the non-scrolling direction (.width if scrolling vertically). I'm not entirely sure why the scrolled directions were equal and the un-scrolled need this sectionMargin addition here, I suspect it has to do with `-[PSTGridLayoutSection computeLayout]`.

Now pstCollectionView.contentSize == uiCollectionView.contentSize, as far as I can tell.