njdehoog / NHBalancedFlowLayout

UICollectionViewLayout subclass for displaying items of different sizes in a grid without wasting any visual space. Inspired by: http://www.crispymtn.com/stories/the-algorithm-for-a-perfectly-balanced-photo-gallery
MIT License
1.34k stars 106 forks source link

Sticky headers #18

Open rvi opened 10 years ago

rvi commented 10 years ago

Hi,

I just modify the layout to have sticky header (like in UITableView) in option. By default, stickyHeaders is set to no.

I don't know if you wanted this feature. I had to implement it for my app, so I sent you a pull request for this feature. If you don't want it in your component, feel free to refuse the pull request :).

R.

njdehoog commented 10 years ago

Thanks for issuing a pull request. I would need to look at this a bit more thoroughly before merging it back, because right now the entire layout would be invalidated many times during scrolling, and I think that will adversely affect performance.

rvi commented 10 years ago

Yes I'm totally agree. If I've got some time to investigate, I'll improve my code, and pull request back.