steipete/PSTCollectionView — pull request #403 by ba01ei (2014-10-13 05:25:11+00:00)
Title: Added cell preload options

Hello,
I'd really appreciate if you are willing to take this pull request although this isn't a feature of UICollectionView.

The main reason I use PSTCollectionView is that it's really hard to find a clean solution for preloading an extra row with either UITableView or UICollectionView. One way is to make the collection view size larger than the screen, it breaks pagination and makes the scrolling perf bad. If I try to manually maintain a dictionary of preloaded cells in scrollViewDidEndDecelerating, it would be buggy if I try to create preloaded cells with dequeueReusableCellWithReuseIdentifier (cells loaded on screen can sometimes/unpredictably be removed because of the dequeue.. call for the preloading), and really hard if I try to preload cells without dequeueReusableCellWithReuseIdentifier when there are multiple cell classes (and bad for perf too). Another solution is to just preload the images, but it's also challenging when there are different cell classes with different layouts that can lead to different image sizes.

So an open-source collection view is the probably best solution i can find right now. I'm guessing that this could be helpful for some other people too. This should introduce any difference if the user doesn't set the preloadMask property.

Thank you so much for creating such an awesome library!