LinkedInAttic / LayoutKit

LayoutKit is a fast view layout library for iOS, macOS, and tvOS.
http://layoutkit.org
Apache License 2.0
3.16k stars 267 forks source link

Nested vertical collection view #162

Open drasdasdasd opened 7 years ago

drasdasdasd commented 7 years ago

Hi guys! Tell me please the right approach about my case.

I need to show the nested collection in the table / collection, as in the example you have. But in your example the collection is horizontal, in my case vertical. I need to show the nested collection in full growth (the sum of cells of all heights). I made several edits in the example:

First: set scroll direction as vertical.

2017-09-16 1 42 29

Second: I added "sumHeights" variable and calculate heights.

2017-09-16 1 47 24

This works, but I'm faced with the fact that it takes up a lot of memory and the memory is not cleaned. Thanks for great library! <3

drasdasdasd commented 7 years ago

Guys what do you think about it?

FabianTerhorst commented 6 years ago

Hi,

Its a bit of time past since the question, but maybe someone else find this useful. i had needed an nested vertical collection view as well, here is my solution: https://gist.github.com/FabianTerhorst/495493358c6987168c4f79aadec4090e