Open garrettmoon opened 7 years ago
Hi.
We want to create a mosaic layout, like the Pinterest's feed. The problem is that cells have different heights, and height calculation should be done in the node automatically by layout engine.
In current implementation as I understand, We have to measure all nodes in advance, even if the layout doesn't care!
, but how to do that ? Should we get all nodes in UICollectionViewLayout
's subclass, and somehow request their calculated height ?
@hovox We have a sample project that does exactly that: https://github.com/TextureGroup/Texture/tree/master/examples/CustomCollectionView.
For further questions, please ask the folks on the #general channel of Texture Slack or post on StackOverflow to get help. Cheers!
Thanks @nguyenhuy. I saw that example, will look closer into it.
https://github.com/TextureGroup/Texture/tree/master/examples/CustomCollectionView
@nguyenhuy This example is good demonstration for offline images. Can you please give me another example of how to implement Pinterest layout with network images? Thank you.
From @Adlai-Holler on December 15, 2016 20:1
Right now the user subclasses
UICollectionViewLayout
and talks directly to the collection view. This brings a number of issues:I've thought through the requirements a bit, I'll add them into this task later.
Copied from original issue: facebookarchive/AsyncDisplayKit#2780